我在一个模块中有2个指令。其中一个是templateUrl属性。在该templateUrl中,我引用了另一个指令,该指令又具有templateUrl。
e.g。
<div> <!--This is my first partial page which uses the SelectorResult directive -->
Here are some results
<div result-carousel>
<!-- here is where some more html should go from result-carousel -->
</div>
</div>
来自带有指令的模块:
app.directive('SelectorResult', function () {
return {
restrict: 'AE',
scope: {},
templateUrl: '/chooser/Pages/partials/selector-result-tmpl.aspx',
replace: true,
controller: 'SelectorResultController',
controllerAs: 'resultCtrl'
};
});
app.directive('resultCarousel', function () {
return {
templateUrl: '/chooser/Pages/partials/carousel-tmpl.html'
};
});
这是我得到的错误: [ngTransclude:orphan] http://errors.angularjs.org/1.2.28/ngTransclude/orphan?p0=%3Cdivlass%3D%carousel-inner%22%20ng-transclude%3D%22%22%3E
我收到有关翻译的错误,我尝试了一些事情,但没有改变。我以为你们大家都有想法。