Let's work on some View Encapsulation
Heyyyyyy.......Encapsulation
Let's work on some Angular Directives
Example of Structural Directives
*Ng-if
Helloooo...condition is satisfied,NG-IF has reached :)
Helloooo...condition is not satisfied,NG-IF cannot reach :(
*Ng-Switch :
Switched to One
Switched to Two
Switched to Three
Switched to Four
Switched to Five
This is Default
*Ng-For :
Example of Attribute Directives
Ng-Class :
Helloooo........I'm Ng-Class from attribute directive used to add/remove css classes
Ng-Style :
Helloooo........I'm Ng-Style from attribute directive used to apply styles
Let's work on some Pipes
Unformatted text:{{msg}}
Unformatted number:{{num1}}
Unformatted Percentage:{{per}}
Unformatted currency:{{cur}}
Example of different built-in Pipes
Lowercasepipe
{{msg | lowercase}}
Uppercasepipe
{{msg | uppercase}}
Datepipe
{{toDate | date}}
Currencypipe
Example 1 :{{cur | currency }}
Example 2 :{{cur | currency:'INR':true:'5.5'}}
Jsonpipe
{{myObject | json}}
Percentpipe
Example 1 :{{per | percent }}
Example 2 :{{per | percent:'1.8'}}
Decimalpipe
Example 1 :{{num1 | number}}
Example 2 :{{num1 | number:'9.4'}}
SlicePipe:
{{msg | slice:1:10}}
Example of custom Pipes
Square root Pipe:
{{num2 | sqrt}}
Square Pipe:
{{num2 | square}}
Let's Know about Services and Dependency Injection