我收到错误:Multiple directives [gridsection, gridsection] asking for templateon : <div gridsection="">
使用此代码。
我不明白我是如何使用嵌套指令的,也不知道是什么原因造成的。
html页面
<div gridsection ></div>
指令
angular.module('web').directive('gridsection', function() {
return {
restrict: 'A',
replace: false,
scope: {
patient: "=patient"
},
templateUrl: 'directive/section.html',
link: function(scope, element, attrs, fn) {
}
};
});
指令/section.html
<div>
here?
</div>
最佳答案
您似乎在 Angular 代码中多次声明了 gridsection。
关于javascript - Angularjs 多个指令 [gridsection, gridsection] 在 : <div gridsection =""> 上请求模板,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25327802/