AngularJS Custom Directives example – Angular Directives

AngularJS Custom Directives example – Angular Directives

An Introduction to the AngularJS Directive

simple Custom directives define are used in AngularJS to simple extend the new functionality of HTML Browser side scripts.and Custom directives means html extends Dom uses are defined using simple “directive” function or methods.AngularJS – Custom Directives

Directives are Simple markers on a HTML DOM element

Like as
-an attribute,
-element name,
-comment
-CSS class

READ :  Laravel get last inserted id

Angular Directives : Defining a Directive

script.js
[php]
var infinityknow = angular.module(‘infinityknow’, []);

Now, define a directive.

infinityknow.directive(‘myDirective’, function() {
return {
restrict: ‘E’,
template: ‘

I made a directive!


};
});
[/php]

HTML
[php]



[/php]

custom directive in angularjs With Example

[php]


AngularJS Custom Directives example – Angular Directives

AngularJS Sample Application




[/php]

Example

Leave a Comment