模板URL上的角度自定义指令404

时间:2016-01-19 10:48:43

标签: angularjs angularjs-directive

**更新:**这是在localhost上运行。

这是我的控制器:

app.controller('adsController',
    ['$scope',
    function($scope){

    $scope.obj = {
       prop : "Hello"
    }
}])

指令:

app.directive('ads', function() {
    return {
        restrict: 'AE',
        scope: { obj: '=' },
        templateUrl: '/modules/ads/templates/ads-template.html'
    };
});

目录:

enter image description here

我在目录中与<ads/>相同的深度调用ads-template.html自定义指令,但我遇到404错误。

enter image description here

0 个答案:

没有答案
相关问题