Coding With Fun
Home Docker Django Node.js Articles FAQ

Angular 2 instruction


May 08, 2021 Angular2


Table of contents


Describe

Angular provides a number of powerful built-in instructions.

In this chapter, let's look at the Angle 2 directive. A ngular templates are dynamic, and when they are rendered by Angular, they change the DOM according to the feed instructions. The directive is a class that contains metadata and will be attached @Directive by the adornor.

Angular has three instructions, which are briefly explained in the following table:

S.N. Instructions and descriptions
1 Component
It is a directive with a template and @Component decorator, it is actually a @Directive decorator, where the features facing the template are extended.
2 Structural instructions
It changes the layout of the DOM by adding, replacing, and deleting its elements.
3 Property instructions
It changes the appearance or behavior of the DOM element. These instructions look like regular HTML properties in the template.