Java, .NET, PHP, PYTHON, ANGULAR, ML, Data Science, Testing, CI Tutorials in Easy Languages.

"Best Software Training, Internship, Project Development center of Indore India, Helpline 780506-3968"

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>
<html>
<head>
    <title></title>
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"> </script>
</head>
<body>
<div ng-app="myapp" ng-controller="myctrl">

<scs></scs>

</div>

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



</script>
</body>
</html>

Post a Comment

If you have any doubt in programming or join online classes then you can contact us by comment .

Previous Post Next Post