Hello, I am facing an issue with a directive that I have included in two HTML files. The 'app' is set as ng-app.
<dir auto=""></div>
The code for the directive is as follows:
app.directive("auto", function() {
scope: {
arr : "="
},
templateUrl : "myHtml.hmtl",
restrict : 'EAC',
link : function(element,scope,attrs) {
scope.getData = function() {
//here data is stored in 'arr' variable
};
scope.getData();
}
});
In the 'myHtml.html' file, I am using the 'arr' with ng-repeat. However, while one file displays the data properly, the other seems to be unable to retrieve the data even though both are using the same directive.
Regrettably, I do not have the time to create a jsFiddle or plunker demonstration at the moment.