기본 Rails/Angular 앱에서 작업하고 ui.router를 사용하여 뷰를 제어하고 있습니다. 그러나 templateUrl
을 사용하려고하면 localhost/app/assets/templates/partial-home.html
오류가 발생합니다. 이 부분품을 어디서 레일에 올려야합니까? 내가 AJAX를 저장도 각도의 $templateCache
에 HTML 템플릿을 캐시 angular-rails-template을 사용하고내 ui.router 템플릿은 레일즈 애플리케이션에 어디에 넣어야합니까?
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 이상을 가져야합니다. –