Posts

Showing posts from July, 2018

What are Directives in Angular JS

Directives allows us to create custom HTML elements and to manipulate DOM(Document Object Model). There are three type of directives 1. Component directive     Creates custom HTML elements or templates 2. Structural directives     Allows us to add or remove elements on the DOM. ex: nGFor,ngIF 3. Attribute directives     allows us to attached event listeners or style properties on elements to create a directive we will have to import it from @angular/core and define a selector once done we will have to add a reference to it on app.module.ts