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