相关疑难解决方法(0)

Angularjs多指令[gridsection,gridsection]要求模板:<div gridsection ="">

我收到错误: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)

javascript angularjs angularjs-directive

4
推荐指数
1
解决办法
7073
查看次数