0
컨트롤러 'appContent'에 필요한 컨트롤러 'appLeft'을 찾을 수 없습니다!각도 지시문 - 컨트롤러를 찾을 수 없습니다.
//app-nav(left)
app.directive('appLeft', function()
{
return {
restrict: 'E',
replace: false,
scope: {
leftItem: "=leftItem"
},
controller:function($scope){
this.title = $scope.leftItem;
},
templateUrl: 'res/tpl/app-left.html',
link: function (scope, ele, attr)
{
scope.toggle=function(index){
scope.leftItem[index].isShow = !scope.leftItem[index].isShow;
}
}
}
});
//app-content
app.directive('appContent',function(){
return {
require:'^appLeft',
restrict: 'E',
replace:false,
transclude:true,
scope:{},
templateUrl:'res/tpl/app-content.html',
link:function(scope,ele,attr,appLeftCtrl){
console.log(appLeftCtrl.title)
}
}
});
컨트롤러 'appContent'에 필요한 컨트롤러 'appLeft'을 (를) 찾을 수 없습니다!
당신은 당신의 HTML 코드를 추가 할 수 있을까요? HTML에 지시어를 어떻게 두 었는가? –