<small id='J5cgw'></small><noframes id='J5cgw'>

        • <bdo id='J5cgw'></bdo><ul id='J5cgw'></ul>

        <legend id='J5cgw'><style id='J5cgw'><dir id='J5cgw'><q id='J5cgw'></q></dir></style></legend>

        <i id='J5cgw'><tr id='J5cgw'><dt id='J5cgw'><q id='J5cgw'><span id='J5cgw'><b id='J5cgw'><form id='J5cgw'><ins id='J5cgw'></ins><ul id='J5cgw'></ul><sub id='J5cgw'></sub></form><legend id='J5cgw'></legend><bdo id='J5cgw'><pre id='J5cgw'><center id='J5cgw'></center></pre></bdo></b><th id='J5cgw'></th></span></q></dt></tr></i><div id='J5cgw'><tfoot id='J5cgw'></tfoot><dl id='J5cgw'><fieldset id='J5cgw'></fieldset></dl></div>
        <tfoot id='J5cgw'></tfoot>

        Yii 2:AngularJS 的目录结构?

        Yii 2: directory structure with AngularJS?(Yii 2:AngularJS 的目录结构?)

            <tbody id='3qvr2'></tbody>
          • <tfoot id='3qvr2'></tfoot>

            <small id='3qvr2'></small><noframes id='3qvr2'>

            • <bdo id='3qvr2'></bdo><ul id='3qvr2'></ul>

                  <i id='3qvr2'><tr id='3qvr2'><dt id='3qvr2'><q id='3qvr2'><span id='3qvr2'><b id='3qvr2'><form id='3qvr2'><ins id='3qvr2'></ins><ul id='3qvr2'></ul><sub id='3qvr2'></sub></form><legend id='3qvr2'></legend><bdo id='3qvr2'><pre id='3qvr2'><center id='3qvr2'></center></pre></bdo></b><th id='3qvr2'></th></span></q></dt></tr></i><div id='3qvr2'><tfoot id='3qvr2'></tfoot><dl id='3qvr2'><fieldset id='3qvr2'></fieldset></dl></div>
                  <legend id='3qvr2'><style id='3qvr2'><dir id='3qvr2'><q id='3qvr2'></q></dir></style></legend>
                1. 本文介绍了Yii 2:AngularJS 的目录结构?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我的 Yii 2 应用程序的目录结构应该是什么?使用 Yii 2 视图真的有意义吗,还是我必须创建一个 AngularJS 应用程序目录并将 Yii 应用程序放在它的一个文件夹中?

                  What should the directory structure of my Yii 2 application be? Does it really makes sense to use Yii 2 views or do I have to create an AngularJS application directory and put the Yii application in one of its folders?

                  解释是什么?

                  推荐答案

                  我建议您将后端 (Yii 2) 和前端 (AngularJS) 分成两个单独的文件夹.死苍蝇和肉丸应分开食用.Yii 2 只提供服务器 API,而 AngularJS 做所有其他事情.

                  I recommend you to split your backend (Yii 2) and frontend (AngularJS) in two separate folders. Dead flies and meatballs should be served separately. Yii 2 just provides the server API, while AngularJS does all other things.

                  project/
                    backend/        // Yii2 app
                      web/          // Public visible backend folder
                        index.php   // Entry point
                      config/
                      controllers/
                      models/
                      ...
                    frontend/
                      app/          // Your AngularJS application here
                        css/        // Styles (.less or .css)
                        img/        // Images
                        lib/        // Third-party libraries such as jQuery or AngularJS
                        js/         // .js files (controllers, services, etc.)
                        partials/   // Templates (.html)
                        index.html
                      tests/        // AngularJS tests
                      node_modules/
                      ...
                  

                  Web 服务器应该这样配置:

                  The web server should be configured this way:

                  • http://mycoolsite.com/api/* 请求 project/backend/web/;
                  • http://mycoolsite.com/* 请求 project/frontend/app/.
                  • http://mycoolsite.com/api/* requests to project/backend/web/;
                  • http://mycoolsite.com/* requests to project/frontend/app/.

                  如果您使用 Apache 作为网络服务器,mod_alias 可以提供帮助你.

                  If you use Apache as a web server, mod_alias can help you.

                  请注意,backendfrontend 目录中的文件夹结构可能会有所不同.

                  Note, that the folder structure inside the backend or frontend directory may vary.

                  • 对于后端,这取决于您喜欢哪种模板(基本或高级).在我的示例中,我使用了基本的.
                  • 对于 frontend,这取决于您的 AngularJS 应用程序组织.在示例中,我使用了 AngularJS 教程应用程序,但对于大型应用程序,最好使用 模块化结构.
                  • For backend it depends on which template you prefer (basic or advanced). In my example I used the basic one.
                  • For frontend it depends on your AngularJS application organization. In the example I used the AngularJS Tutorial App, but for huge applications it is better to use a modular structure.

                  这篇关于Yii 2:AngularJS 的目录结构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)

                    <small id='4EYlR'></small><noframes id='4EYlR'>

                        <legend id='4EYlR'><style id='4EYlR'><dir id='4EYlR'><q id='4EYlR'></q></dir></style></legend><tfoot id='4EYlR'></tfoot>

                        • <i id='4EYlR'><tr id='4EYlR'><dt id='4EYlR'><q id='4EYlR'><span id='4EYlR'><b id='4EYlR'><form id='4EYlR'><ins id='4EYlR'></ins><ul id='4EYlR'></ul><sub id='4EYlR'></sub></form><legend id='4EYlR'></legend><bdo id='4EYlR'><pre id='4EYlR'><center id='4EYlR'></center></pre></bdo></b><th id='4EYlR'></th></span></q></dt></tr></i><div id='4EYlR'><tfoot id='4EYlR'></tfoot><dl id='4EYlR'><fieldset id='4EYlR'></fieldset></dl></div>
                            <tbody id='4EYlR'></tbody>
                            <bdo id='4EYlR'></bdo><ul id='4EYlR'></ul>