Create User Define Directive in Angular Application

Create User Define Directive in Angular Application:-

Directive is used to provide predefine functionality under angular application we can create our own directive tag using directive();

app.module('modulename',[]).directive('directivename',function(){ return{ template :value}})

Example of Directive Elements of Angular JS:-
<!DOCTYPE html>
    <script src=""> </script>
<div ng-app="myapp" ng-controller="myctrl">



angular.module('myapp',[]).directive('scs',function(){return {template:'<marquee>welcome in SHIVA Concept Solution</marquee>'}});



Post a Comment


POST Answer of Questions and ASK to Doubt

Post a Comment (0)