1010- [ Configuration] ( #configuration )
1111- [ Components] ( #components )
1212- [ Data Binding] ( #data-binding )
13- - [ Directives] ( #angular-directives )
13+ - [ Directives] ( #directives )
14+ - [ Structural Directives] ( #structural-directives )
15+ - [ Attribute Directives] ( #attribute-directives )
16+ - [ Custom Directives] ( #custom-directives )
1417- [ Pipes] ( #pipes )
18+ - [ Date Pipe] ( #date-pipe )
19+ - [ Uppercase Pipe] ( #uppercase-pipe )
20+ - [ Lowercase Pipe] ( #lowercase-pipe )
21+ - [ Currency Pipe] ( #currency-pipe )
22+ - [ Percent Pipe] ( #percent-pipe )
23+ - [ Slice Pipe] ( #slice-pipe )
24+ - [ Decimal/number Pipe] ( #decimalnumber-pipe )
1525- [ Decorators] ( #decorators )
26+ - [ Input] ( #input )
27+ - [ Output] ( #output )
28+ - [ HostListener] ( #hostlistener )
29+ - [ ContentChild & ContentChildren] ( #contentchild--contentchildren )
30+ - [ ViewChild & ViewChildren] ( #viewchild--viewchildren )
1631- [ Life Cycle Hooks] ( #life-cycle-hooks )
32+ - [ OnChanges] ( #onchanges )
33+ - [ OnInit] ( #oninit )
34+ - [ DoCheck] ( #docheck )
35+ - [ AfterViewInit] ( #afterviewinit )
36+ - [ AfterViewChecked] ( #afterviewchecked )
37+ - [ AfterContentInit] ( #aftercontentinit )
38+ - [ AfterContentChecked] ( #aftercontentchecked )
39+ - [ OnDestroy] ( #ondestroy )
1740- [ Forms] ( #forms )
1841- [ Http] ( #http )
1942- [ Module] ( #module )
@@ -444,11 +467,11 @@ export class AppComponent {
444467
445468[Back to top⤴️](#contents)
446469
447- ## Angular Directives
470+ ## Directives
448471
449472Directives add behaviour to an existing DOM element or an existing component instance.
450473
451- ### Structural DIrectives -
474+ ### Structural Directives
452475
453476**ngFor** -
454477
@@ -653,7 +676,7 @@ Expression | pipeOperator[:pipeArguments]
653676# pipeArguments: arguments to the Pipe
654677` ` `
655678
656- Date Pipe
679+ ### Date Pipe
657680
658681` ` ` html
659682< h1> Date Pipe Example< / h1>
@@ -696,7 +719,7 @@ import { DatePipe } from '@angular/common';
696719export class AppModule {}
697720` ` `
698721
699- Uppercase Pipe
722+ ### Uppercase Pipe
700723
701724` ` ` html
702725< h1> Upper Case Pipe Example< / h1>
@@ -716,7 +739,7 @@ export class AppComponent {
716739}
717740` ` `
718741
719- Lowercase Pipe
742+ ### Lowercase Pipe
720743
721744` ` ` html
722745< p> {{ name | lowercase }}< / p>
@@ -735,7 +758,7 @@ export class AppComponent {
735758}
736759` ` `
737760
738- Currency Pipe
761+ ### Currency Pipe
739762
740763` ` ` html
741764< h1> Currency Pipe Example< / h1>
@@ -779,7 +802,7 @@ import { CurrencyPipe } from '@angular/common';
779802export class AppModule {}
780803` ` `
781804
782- Percent Pipe
805+ ### Percent Pipe
783806
784807` ` ` html
785808< h1> Percent Pipe Example< / h1>
@@ -824,13 +847,13 @@ import { PercentPipe } from '@angular/common';
824847export class AppModule {}
825848` ` `
826849
827- Slice Pipe
850+ ### Slice Pipe
828851
829852` ` ` typescript
830853< p> {{ [' apple' , ' banana' , ' orange' , ' mango' ] | slice: 1 : 3 }}< / p>
831854` ` `
832855
833- Decimal/number Pipe
856+ ### Decimal/number Pipe
834857
835858` ` ` html
836859< p> {{ 123456.78 | number: ' 3.2-3' }}< / p>
@@ -842,7 +865,7 @@ Decimal/number Pipe
842865
843866Decorators are design patterns used to isolate the modification or decoration of a class without modifying the source code.
844867
845- **Input** -
868+ ### Input
846869
847870` ` ` ts
848871import { Component , Input , OnInit } from ' @angular/core' ;
@@ -910,7 +933,7 @@ import { ParentComponent } from './parent/parent.component';
910933export class AppModule {}
911934` ` `
912935
913- **Output** -
936+ ### Output
914937
915938` ` ` ts
916939import { Component , EventEmitter , OnInit , Output } from ' @angular/core' ;
@@ -965,7 +988,7 @@ export class ParentComponent implements OnInit {
965988< app- parent>< / app- parent>
966989` ` `
967990
968- HostListener
991+ ### HostListener
969992
970993` ` ` html
971994< h1> @HostListener Decorator Example< / h1>
@@ -988,7 +1011,7 @@ export class AppComponent {
9881011}
9891012` ` `
9901013
991- contentChild & contentChildren
1014+ ### contentChild & contentChildren
9921015
9931016` ` ` ts
9941017import {
@@ -1031,7 +1054,7 @@ export class ParentComponent implements OnInit {
10311054< app- parent>< / app- parent>
10321055` ` `
10331056
1034- viewChild & viewChildren
1057+ ### viewChild & viewChildren
10351058
10361059` ` ` ts
10371060import { Component , ElementRef , QueryList , ViewChild , ViewChildren } from ' @angular/core' ;
@@ -1066,7 +1089,9 @@ export class AppComponent {
10661089
10671090
10681091
1069- **ngOnChanges** - It is called when any data-bound property of a directive or component changes.
1092+ ### OnChanges
1093+
1094+ It is called when any data-bound property of a directive or component changes.
10701095
10711096` ` ` html
10721097< form>
@@ -1114,7 +1139,9 @@ export class TestComponent implements OnChanges {
11141139
11151140[Stackblitz Link](https://stackblitz.com/edit/angular-ivy-19r5mc?file=src/app/test/test.component.ts)
11161141
1117- **ngOnInit** - It is called after a component has been initialized and its data-bound properties have been checked for the first time.
1142+ ### OnInit
1143+
1144+ It is called after a component has been initialized and its data-bound properties have been checked for the first time.
11181145
11191146` ` ` ts
11201147import { Component } from ' @angular/core' ;
@@ -1135,7 +1162,9 @@ export class AppComponent {
11351162
11361163[Stackblits Link](https://stackblitz.com/edit/angular-ivy-hkmssz?file=src/app/app.component.html)
11371164
1138- **ngDoCheck** - It is called during every change detection cycle. It allows a component to detect and act upon changes that Angular can't detect on its own.
1165+ ### DoCheck
1166+
1167+ It is called during every change detection cycle. It allows a component to detect and act upon changes that Angular can't detect on its own.
11391168
11401169` ` ` ts
11411170import { Component , DoCheck } from ' @angular/core' ;
@@ -1154,7 +1183,9 @@ export class AppComponent implements DoCheck {
11541183
11551184[Stackblitz Link](https://stackblitz.com/edit/angular-ivy-f5msas?file=src/app/app.component.ts)
11561185
1157- **ngAfterViewInit** - It is called after app has fully initialized a component's view.
1186+ ### AfterViewInit
1187+
1188+ It is called after app has fully initialized a component's view.
11581189
11591190` ` ` ts
11601191import { AfterViewInit , Component } from ' @angular/core' ;
@@ -1181,7 +1212,9 @@ export class AppComponent implements AfterViewInit{
11811212
11821213[Stackblitz Link](https://stackblitz.com/edit/angular-wscf59?file=src/main.ts)
11831214
1184- **ngAfterViewChecked** - It is called after the default change detector has completed checking a component's view for changes.
1215+ ### AfterViewChecked
1216+
1217+ It is called after the default change detector has completed checking a component's view for changes.
11851218
11861219` ` ` ts
11871220import { AfterViewChecked , Component } from ' @angular/core' ;
@@ -1207,7 +1240,9 @@ export class AppComponent implements AfterViewChecked {
12071240
12081241[Stackblitz Link](https://stackblitz.com/edit/angular-wnwfnv?file=src/main.ts)
12091242
1210- **ngAfterContentInit** - It is called after Angular has fully initialized all content of a directive.
1243+ ### AfterContentInit
1244+
1245+ It is called after Angular has fully initialized all content of a directive.
12111246
12121247` ` ` ts
12131248import { AfterContentInit , Component } from ' @angular/core' ;
@@ -1233,7 +1268,9 @@ export class AppComponent implements AfterContentInit {
12331268
12341269[Stackblitz Link](https://stackblitz.com/edit/angular-qhy7cw?file=src/main.ts)
12351270
1236- **ngAfterContentChecked** - It is called after the default change detector has completed checking all content of a directive.
1271+ ### AfterContentChecked
1272+
1273+ It is called after the default change detector has completed checking all content of a directive.
12371274
12381275` ` ` ts
12391276import { AfterContentInit , Component } from ' @angular/core' ;
@@ -1259,7 +1296,9 @@ export class AppComponent implements AfterContentInit {
12591296
12601297[Stackblitz Link](https://stackblitz.com/edit/angular-ryx2uh?file=src/main.ts)
12611298
1262- **ngOnDestroy** - It is called just before a component or directive is destroyed. It is a good place to clean up any subscriptions or detach any event handlers to avoid memory leaks.
1299+ ### OnDestroy
1300+
1301+ It is called just before a component or directive is destroyed. It is a good place to clean up any subscriptions or detach any event handlers to avoid memory leaks.
12631302
12641303` ` ` ts
12651304import { Component , OnDestroy , OnInit } from ' @angular/core' ;
0 commit comments