This is my directive. It works, But when I uncomment scope{}
- DOM elements do not see scope.greeting
.
app.directive('myDir', function () {
return {
restrict: 'E',
//scope:{},
compile: function(tHtml,tAttr){
return {
post: function(scope,ele,attr){
scope.greeting = 'Hello!';
}
}
}
};
If to use the common way witk link function then all works. At the same time I cannot use Compile and Link at the same time What is wrong?