Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
What is ngOnInit ()?
Home
Angular
What is ngOnInit ()?
0
votes
asked
Jan 6, 2020
in
Angular
by
sharadyadav1986
What is ngOnInit ()?
#ngoninit
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Jan 6, 2020
by
rajeshsharma
ngOnInit () is a lifecycle hook that is called after Angular has finished initializing all data-bound properties of a directive. It is defined as:
Interface OnInit {
ngOnInit () : void
}
Your comment on this answer:
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Related questions
0
votes
Q: What is ngOnInit in angular?
asked
Aug 11, 2023
in
Angular
by
DavidAnderson
angular-interview-questions-answers
0
votes
Q: What is the key difference between a constructor and ngOnInit?
asked
Jun 6, 2022
in
Angular
by
john ganales
ngoninit
constructor
+1
vote
Q: When ngOnInit event get called in Angular 2 Application Lifecycle?
asked
Jan 24, 2022
in
Angular
by
sharadyadav1986
ngoninit-event
...