我收到错误:Multiple directives [gridsection, gridsection] asking for templateon : <div gridsection="">使用此代码.
我不知道我是如何使用嵌套指令或导致这种情况的原因.
HTML页面
<div gridsection ></div>
Run Code Online (Sandbox Code Playgroud)
指示
angular.module('web').directive('gridsection', function() {
return {
restrict: 'A',
replace: false,
scope: {
patient: "=patient"
},
templateUrl: 'directive/section.html',
link: function(scope, element, attrs, fn) {
}
};
});
Run Code Online (Sandbox Code Playgroud)
指令/ section.html
<div>
here?
</div>
Run Code Online (Sandbox Code Playgroud)