1
var app = angular.module('home', []);
app.controller('articleController', ['$scope', function($scope) {
$scope.title = "elad";
$scope.writer = "elad";
$scope.content = "bla bla bla bla bla";
}]);
app.directive('drArticle', function() {
return {
templateUrl: '/app/shared/article/Views/articleView.html'
};
});
的templateUrl
正試圖通過這個網址訪問HTML文件:使用templateUrl angularjs
http://127.0.0.1:56911/app/componenets/home/app/shared/article/Views/articleView.html
該文件實際上位於:
http://127.0.0.1:56911/app/componenets/home/views/index.html
我怎樣才能修復路徑是這樣的:
http://127.0.0.1:56911/app/shared/article/Views/articleView.html
怎麼樣templateUrl:」 ../../../app/共享/條/查看/ articleView.html」 沒有嘗試過自己 –
我猜你正在創建構建使用一飲而盡/呻吟,從應用程序的多個js文件它創建一個單一的文件,並在文件夾結構得到改變之前,你沒有得到模板。 – Indra