Angularjs多个指令[gridsection,gridsection]要求模板:< div gridsection =""> [英] Angularjs Multiple directives [gridsection, gridsection] asking for template on: <div gridsection="">

查看:130
本文介绍了Angularjs多个指令[gridsection,gridsection]要求模板:< div gridsection ="">的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到错误:使用此代码要求templateon:< div gridsection => 的多个指令[gridsection,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

html page

<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) {


        }
    };
});

directive / section.html

directive/section.html

<div>
  here?
</div>


推荐答案

好像你在多次声明网格部分你的角度代码。

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

这篇关于Angularjs多个指令[gridsection,gridsection]要求模板:&lt; div gridsection =&quot;&quot;&gt;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆