How can I add, in isolate scope, two way data binding attr in case of directive including in another directive?? index.html
<event event-width width="width"></event>
directive.js
ll.directive('event',function() {
return {
restrict: 'E',
scope:{ //error !!! Error: [$compile:multidir] Multiple directives [event, eventWidth] asking for new/isolated scope on
event: '='
},
templateUrl: function (attr, elem) {
return 'app/template/' + elem.template;
},
link:function(scope,elem,attr){
console.log(scope.width)
}
}
});
ll.directive('eventWidth',function() {
return {
restrict: 'A',
scope:{
width: '='
},
link:function(scope,elem,attr){
}
}
});
Compiler throw this error: Error: [$compile:multidir] Multiple directives [event, eventWidth] asking for new/isolated scope on
How can I read and set the width property declared outer of event scope ?? An elegant way, please ;)