2
我正在使用一個django項目,該項目依賴於angularjs並且難以實現angular-ui-router framework
。Angular-ui路由器沒有用django渲染模板
如在文檔中提到我已經包括ui.router
作爲依賴,
app = angular.module('myApp',['restangular','ui.router',])
配置的狀態如下,
app.config(['$stateProvider',function($stateProvider){
$stateProvider.state('landing',{
url: '/',
template:"<p> somethings here.</p>"
})
}]);
在base.html
文件I引導與angularjs Django的項目根據需要 ng-app=myApp
。
和index.html
它繼承base.html
<div ui-view>
<i>nothing here but this text</i>
</div>
我urls.py
,
url(r'^$',home,name="homepage")
這不起作用,ui-router
從未包括index.html
的inline template
。總是加載nothing here but this text
。我在這裏看到了很多問題,但沒有幫助。我錯過了什麼,這是特定於Django?
是固定的吧.. – 2014-09-22 18:42:18
太好了,享受真棒UI路由器:) – 2014-09-22 18:53:56