Hi Guest 1 HomePage 1 Jobs 1 WalkIn 1Articles  

 :) Latest Topic
Numbers And Strings
Objects And Array
AngularJS VS JavaScript
Controllers in Files
Load the Library
AngularJS Directives
Repeating Directive
AngularJS Facts
Create Directives
Restrict Directive
Custom Filter
AngularJS Services
AngularJS Service 2
AngularJS Tables
Select Option
Select Option 2
AngularJS Forms
Form Validation
Validation CSS
Validation Example
AngularJS API
AngularJS $http
AngularJS Database
AngularJS HTML DOM
AngularJS Events
Custom Validation
AngularJS Tutorial
AngularJS Introduction
Angular init Directive
AngularJS Expressions 1
AngularJS Applications
AngularJS Expressions 2
Angular CSS Properties
AngularJS JSON
AngularJS Modules
Controller Basic
Add a Directive
Model Directive
Validate Inputs
CSS Classes
Data Binding
AngularJS Controller
AngularJS Scope
Root of Scope
AngularJS Filters
 


  

 
Create Directives
Question Posted on 09 Apr 2020

Home >> Tutorial >> AngularJS >> Create Directives


Create Directives
As from previous chapter we came to knows there are several built-in Angular-JS directives. But we have option to create our own directives. To create new directives we use .directive function. To invoke new directive make an HTML element with same tag name as the new directve. We must use camel casename like for Newtestdirective but when we invoking iy we must use - separated name like New-test-directive.

We can invoke a directive by using:-
(1)Element Name
(2)Attribute
(3)Class
(4)Comment

Below is the example for creating new Directives:-


Create New Directive
Now below is the details of 4 above elements


AngularJS 4 elements





Other Important Questions
Numbers And Strings
Objects And Array
AngularJS VS JavaScript
Controllers in Files
Load the Library







 
Top Searches:asp net questions vb net questions sql query uddl questions class javascript Questions sharepoint interview questions and concept silverlight questions and concept wcf questions beans general knowledge ajax questions
PHP | Biztalk | Testing | SAP | HR |