javascriptangularjsangularjs-directive

Angularjs Multiple directives [gridsection, gridsection] asking for template on: <div gridsection="">


I'm receiving the error: Multiple directives [gridsection, gridsection] asking for templateon : <div gridsection=""> with this code.

I don't see how i'm using nested directives or what is causing this.

html page

<div gridsection ></div>

directive

angular.module('web').directive('gridsection', function() {
    return {
        restrict: 'A',
        replace: false,

        scope: {
      patient: "=patient"
        },
        templateUrl: 'directive/section.html',
        link: function(scope, element, attrs, fn) {


        }
    };
});

directive/section.html

<div>
  here?
</div>

Solution

  • It seems like you are declaring the gridsection multiple times in your angular code.