3
앵글 러 1.5 *각도는 템플릿 캐시를 사용하지 않습니다
내 템플릿 캐시를 사용할 수 없습니다. 나는 그것이 html 파일을 찾을 수 없도록 의도적으로 잘못된 경로 이름을 주었다. 대신 템플릿 캐시를 사용하지 않고 html 파일을 요청합니다.
templates.js
angular.module("gulpTemplates", []).run(["$templateCache", function($templateCache) { $templateCache.put("aaaa/views/examples.html"
...
는 app.js
var gulpNewy =
angular
.module('gulpNewy', ['ngRoute', 'gulpTemplates'])
.config(function($routeProvider) {
$routeProvider
.when('/home', {
templateUrl: 'views/home.html',
controller: 'homeCtrl'
})
.when('/examples', {
templateUrl: 'views/examples.html'
})
.when('/screen-shots', {
templateUrl: 'views/screen-shots.html'
})
index.html을 내가 잘못 뭐하는 거지
<div class="col-xs-12" ng-view></div>
?
당신은/전에 aaaa를 사용합니까? 또는 어떻게 템플릿을 사용합니까? – YOU
gulpTemplates에 필요한 모든 콘텐츠가 포함되어 있습니까? – Max
gulpTemplates 모듈을 올바르게 주입하고 있습니까? – Max