filmov
tv
Displaying Dynamic Data in Angular - Directives, String Interpolation and Template Expressions

Показать описание
Displaying Dynamic Data in Angular
Topics covered:
Displaying Dynamic Data:
- Types of Directives
- Template Expressions
- String Interpolation
I] Types of Directives:
Directives are the classes that can change the behavior or appearance of the components by using CSS Classes,
CSS Styles and events.
There are three kinds of directives in Angular:
1. Components
- Directives with a template.
- These are the most commonly used Directive.
2. Structural directives
- Change the DOM layout by adding and removing DOM elements.
- Change the structure of the view
Example: ngFor and ngIf
3. Attribute directives
- Change the appearance or behavior of an element.
- Are used as attributes of elements
II] Template Expressions:
We put a template expression within the interpolation braces, we write expressions in a language that looks like
JavaScript. JavaScript expressions that have or promote side effects are prohibited, including: assignments (=, +=, -=, ...), new, chaining expressions with; or, increment and decrement operators (++ and --)? no support for the bitwise operators | and & Angular2 Displaying Data using Templates
We have two special operators supported in Template expression | and ?.
1. The pipe operator |
2. The safe navigation operator ?.
III] String Interpolation:
The easiest way to display a component property is to bind the property name through interpolation.
Angular evaluates all expressions in double curly braces, converts the expression results to strings, and links them with neighboring literal strings. Finally, it assigns this composite interpolated result in an element or directive
property
------------------------------------------------------------------------------------------------------------------------------------------
For Complete AngularJS Online Training
Mr. Sandeep Soni is a famous Corporate Tainer in Microsoft Azure AZ-103, AZ-203, AZ-300, AZ-301, AZ-400, AZ-500, Containerization in Docker, Microservices - Kubernetes and Azure Service Fabric and more...
For any course-related queries, reach us @ +91 8555823343 / +91 8008327000 Kashmira Shah
Please leave your comment about the videos.
For more updates on courses and tips follow us on:
Topics covered:
Displaying Dynamic Data:
- Types of Directives
- Template Expressions
- String Interpolation
I] Types of Directives:
Directives are the classes that can change the behavior or appearance of the components by using CSS Classes,
CSS Styles and events.
There are three kinds of directives in Angular:
1. Components
- Directives with a template.
- These are the most commonly used Directive.
2. Structural directives
- Change the DOM layout by adding and removing DOM elements.
- Change the structure of the view
Example: ngFor and ngIf
3. Attribute directives
- Change the appearance or behavior of an element.
- Are used as attributes of elements
II] Template Expressions:
We put a template expression within the interpolation braces, we write expressions in a language that looks like
JavaScript. JavaScript expressions that have or promote side effects are prohibited, including: assignments (=, +=, -=, ...), new, chaining expressions with; or, increment and decrement operators (++ and --)? no support for the bitwise operators | and & Angular2 Displaying Data using Templates
We have two special operators supported in Template expression | and ?.
1. The pipe operator |
2. The safe navigation operator ?.
III] String Interpolation:
The easiest way to display a component property is to bind the property name through interpolation.
Angular evaluates all expressions in double curly braces, converts the expression results to strings, and links them with neighboring literal strings. Finally, it assigns this composite interpolated result in an element or directive
property
------------------------------------------------------------------------------------------------------------------------------------------
For Complete AngularJS Online Training
Mr. Sandeep Soni is a famous Corporate Tainer in Microsoft Azure AZ-103, AZ-203, AZ-300, AZ-301, AZ-400, AZ-500, Containerization in Docker, Microservices - Kubernetes and Azure Service Fabric and more...
For any course-related queries, reach us @ +91 8555823343 / +91 8008327000 Kashmira Shah
Please leave your comment about the videos.
For more updates on courses and tips follow us on: