Answer: We can restrict the Directive by using a Property "restrict" with value "A" so it will be invoked only by attributes.
var app = angular.module("myApp", []);
app.directive("DNFTestDirective", function() {
return {
restrict : "A",
template : "<h1>DotnetFunda is the best for Online Dotnet Support</h1>"
};
});
Asked In: Many Interviews |
Alert Moderator