I have encountered a situation where implementing an encapsulating function breaks my directive. Strangely, without the encapsulation, everything works fine. Has anyone else faced this issue before or can shed some light on why it might be causing the directive to break?
(function () {
myApp.directive('myPerfectDirective', function(){
return{
restrict: 'E',
scope: {
data: '='
},
template: '<p>my perrrrrrfeccct directivve</p>',
templateUrl: 'book-widget.html'
}
});
});