Monday, January 21, 2019

Angular - Constructor vs. ngOnInit

Constructor is called when the class is instantiated. It is a good place to initialize class properties and inject dependencies.

ngOnInit is a lifecycle hook and is called after the constructor is called and all the variables are initialized. 

Order of Events


1 comment:

  1. As reported by Stanford Medical, It's indeed the SINGLE reason this country's women get to live 10 years more and weigh 42 lbs lighter than us.

    (And actually, it is not related to genetics or some secret diet and absolutely EVERYTHING to about "how" they are eating.)

    BTW, What I said is "HOW", not "WHAT"...

    Tap this link to determine if this quick quiz can help you unlock your true weight loss possibilities

    ReplyDelete

Github Actions - CI/CD for React.js

 1. Install gh-pages npm package Command:  npm install gh-pages --save-dev 2. In package.json, add the homepage url "homepage": &q...