4
我正在使用基本的Rails/Angular應用程序,並使用ui.router來控制視圖。但是,當我嘗試使用templateUrl
時,出現localhost/app/assets/templates/partial-home.html
錯誤。我應該把這些部分放到軌道上?我在哪裏把我的ui.router模板放在rails應用程序中?
app.config(function($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/');
$stateProvider
.state('home', {
url: '/',
template: "this is a test of the state provider",
//templateUrl: 'app/assets/templates/partial-home.html',
controller: 'testCtrl'
});
});
你也必須有鏈輪版本> = 2.12 –