angularjs - Angular and django integration -
I am writing an application with the digengo and angular and I have a problem after the authentication of the demo, I used the Mozilla app definition Along with the MVC scene changes.
& lt; Div class = "main" & gt; & Lt; Div class = "main-internal" & gt; & Lt; Div class = "container" ng-ap = "povos" ng-view & gt; {% Block content%} {% endblock%} {% block script%} {% endblock%} & lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Script src = "/ static / assets / js / bootstrap.js" & gt; & Lt; / Script & gt; & Lt; Script src = "/ static / assets / js / angular.js" & gt; & Lt; / Script & gt; & Lt; Script src = "/ static / assets / js / angular-route.js" & gt; & Lt; / Script & gt; & Lt; Script src = "/ static / assets / js / angular-cookies.js" & gt; & Lt; / Script & gt; & Lt; Script src = "/ static / spa_app / app.js" & gt; & Lt; / Script & gt; & Lt; Script src = "/ static / spa_app / modules / messages / messages.module.js" & gt; & Lt; / Script & gt;
My app.js looks like this:
Angular The module ('Powos', [' Pove Message '])
and my message modules like the following:
angular.module (' povos.messages ', [' NgRoute ']) .config ([' $ routeProvider ', function ($ RouteProvider.) {$ RouteProvider. When (' / message ', {templateUrl:' messages.html '})}]
My problem is that if I return that view and I try to request for the message / path:
page not found ( 404) Request method: Receive the request URL: http://127.0.0.1:8000/ Message povos URL, not Genzo Tried these URL patterns in this order: (URL here) The current URL, message, did not match any of these.
My browses call the DGEGO MVC App. In this way, do I understand that it is not possible to work only on the callular street provider? How to configure it? Sorry for my English but this is not my native language.
So, first make sure that the / message /
DJ is available in Ango's urls.py
.
After successfully loading root pages and angiarie files, the Kangaroo URL becomes aware: # By default this hash form, so only when the URL / messages / # / Message
, the router of angles can match the URL and you can provide message.html
.
/ messages / # / messages ^ ^ ^ | | | | | | | Angular part | Django part
Comments
Post a Comment