S
S
slip312014-08-10 10:42:29
Data storage
slip31, 2014-08-10 10:42:29

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.jsngRouteui-route

frontend/modules/ang/views/default/partials/part1.html

templateUrl is not connected - they are not found, i.e. all the time 404 in chrome. But it does not swear at a cross-domain request. Do not transfer Assets because of this
to the frontend. How to work with it?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
Алексей, 2016-06-01
@alsopub

Может вам подойдет - https://www.dropbox.com/ru/help/9090
"Dropbox - запрос на загрузку файла"

Егор Огурцов, 2016-06-01
@mrdubz

https://tech.yandex.ru/disk/

A
Alexander Zelenin, 2014-08-10
@slip31

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

S
Sergey, 2014-08-10
Protko @Fesor

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 question

Ask a Question

731 491 924 answers to any question