angularjs – 使用md-button时的ng-transclude错误
发布时间:2020-12-17 07:13:59 所属栏目:安全 来源:网络整理
导读:我用以下方式使用md-button: md-button aria-label="edit" target-mode="edit" style="z-index: 9;right: 10px; top: 10px; position: absolute;" i class="fa fa-check"/i /md-button 并收到以下错误: Error: [ngTransclude:orphan] Illegal use of ngTra
我用以下方式使用md-button:
<md-button aria-label="edit" target-mode="edit" style="z-index: 9;right: 10px; top: 10px; position: absolute;"> <i class="fa fa-check"></i> </md-button> 并收到以下错误: Error: [ngTransclude:orphan] Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: <button class="md-button md-default-theme" ng-transclude="" aria-label="show" target-mode="show" style="z-index: 9;right: 10px; top: 10px; position: absolute;"> 我一直想弄清楚为什么会发生这种情况一段时间 – 也许有人曾经有过这种情况吗? BTW – 您在错误中看到的ng-transclude会以某种方式自动插入. 解决方法
我遇到过同样的问题.我能够通过从索引屏幕中删除ng-app来修复它.
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |