I've created two directives with isolate scopes. When I include both on the same DOM element:
<div directive-one="" type-message="setMessageError" directive-two="">
I'm getting obviously the following error:
Multiple directives [directiveOne, directiveTwo] asking for new/isolated scope on:
app.directive('directiveOne',function () {
return {
scope: {
typeMessage: "=",
},
};
}]);
app.directive('directiveTwo', function () {
return {
templateUrl: 'template.html',
controller: function($scope) {$scope.setMessageError="error";}
restrict: 'A',
scope: {
someScope: "="
},
};
});
Is there any way to set attribute typeMessage from directiveTwo by directiveTwo's controller, as you can see on the below example.