Answer the question
In order to leave comments, you need to log in
How to work in conjunction with Yii2 and angular.js?
I am making an application on yii2advanced. all js, css are placed on the statics subdomain.
Angular.js and modules for it have also been moved there. It turns out that the index.php that I'm working with
is in and all the angular controllers that interact with index.php in Everything works until the moment of use or Dofrontend/modules/ang/views/default/index.php
statics/js/ang/app.js
ngRoute
ui-route
frontend/modules/ang/views/default/partials/part1.html
Answer the question
In order to leave comments, you need to log in
Может вам подойдет - https://www.dropbox.com/ru/help/9090
"Dropbox - запрос на загрузку файла"
you write that the angular templates are located here frontend/modules/ang/views/default/partials/part1.html
but by design the application code is taken out from the root of the site (web), and the angular receives the templates via http
I think it will be easier for you to organize just two projects. One on Yii2, where there will be just a REST Api and an admin panel is possible, and the other is an application on angular. Two different applications that do not really know anything about each other, they are connected only by HTTP and REST.
In general, the advantage of such approaches is that different methods can be done on different frameworks, programming languages, distributed to different servers ... in short, heaps of everything for the sake of performance. Yes, and it will be easier for you to organize the project.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question