0
我正在尝试在另一个客户指令的模板中添加一个自定义指令,但不显示该模板。使用下面的代码。我究竟做错了什么?另一个指令模板中的指令
app.js
var app = angular.module('myApp', []);
app.directive('container', function() {
return {
restrict: 'A',
scope: {},
replace: true,
template: '<div my-dir-one></div>',
link: function (scope, elm) {
}
}
});
app.directive('myDirOne', function() {
return {
restrict: 'A',
scope: {},
replace: true,
template: '<div>This is directive one.</div>'
}
});
HTML:
<div container></div>
这是我的实际问题http://stackoverflow.com/questions/31214894/nested-directive-within-ngview-does-not-work-angular-js – MNVR