Skip to main content

#7 angular 8 tutorial in hindi | Directive in angular application | Dire...

                    



#7 angular 8 tutorial in hindi | Directive in angular application | Directive in angular 9 by Ashish

What is an Angular Directive?

Directives are the functions which will execute whenever Angular compiler finds it. Angular Directives enhance the capability of HTML elements by attaching custom behaviors to the DOM.

From the core concept, Angular directives are categorized into three categories.

Attribute Directives
Structural Directives
Components
Attribute Directives
Attribute Directives are responsible for manipulating the appearance and behavior of DOM elements. We can use attribute directives to change the style of DOM elements. These directives are also used to hide or show particular DOM elements conditionally. Angular provides many built-in Attribute Directives like NgStyle, NgClass, etc. We can also create our own custom Attribute Directives for our desired functionality.

Structural Directives
Structural Directives are responsible for changing the structure of the DOM. They work by adding or removing the elements from the DOM, unlike Attribute Directives which just change the element’s appearance and behavior.

You can easily differentiate between the Structural and Attribute Directive by looking at the syntax. The Structural Directive’s name always starts with an asterisk(*) prefix, whereas Attribute Directive does not contain any prefix. The three most popular built-in Structural Directives Angular provides are NgIf, NgFor, and NgSwitch.

Components
Components are directives with templates. The only difference between Components and the other two types of directives is the Template. Attribute and Structural Directives don't have Templates. So, we can say that the Component is a cleaner version of the Directive with a template, which is easier to use.



Comments

Popular posts from this blog

#Angular 10 #Star #rating example | Star Review System in angular by #Te...

           In this video, we build a five-star review system with #Angular10 . #Angular 10 #Star #rating example | Star Review System in angular by #Testycodeiz . rating system, #Angular 10 #Star #rating example,angular star rating,angular star rating component,star rating in angular,star rating in angular 8,Star Review System in angular,angular by #Testycodeiz ,angular rating,angular rating star,angular 4 star rating,angular 5 star rating,angular 6 star rating,angular 7 star rating,angular 8 star rating,angular 9 star rating sytem,angular 10 star rating system,angular star rating by testy codeiz,testycodeiz angular

#8 how to create RESTful API with nodejs in hindi | PUT method in REST A...

                    how to create #RESTful API with #nodejs in hindi | #PUT method in REST API in #nodejs by Ashish 😮 Use PUT when you want to modify a singular resource which is already a part of resources collection. PUT replaces the resource in its entirety. Use PATCH if request updates part of the resource. Generally, in practice, always use PUT for #UPDATE operations. Handling PUT requests PUT requests will be used to make updates to existing resources. It’s important to note that #PUT is used to replace the entire resource – it doesn’t do partial updates (I will show you how to do this with PATCH in the future).

mongoDB,How to download mongoDB, How to Install MongoDB, MongoDB for Ang...

           mongoDB,How to download mongoDB, How to Install MongoDB, MongoDB for Angular, MongoDB for MEAN Stack, mongoDB download and Install, #MongoDB ​ , #Angular ​ , #Nodejs ​ , Mongodb installation, Mongodb for Angular 11, mongodb for angular 10, mongodb for angular 9, mongodb with Testycodeiz, Mongodb for MEAN, Download MongoDB Link: mongodb.com/try/download/community?tck=docs_server