Skip to main content

Posts

Showing posts with the label angular 2 development environment

Angular 2 Component Constructor vs. OnInit event

The constructor is a typescript feature. The constructor is only related to class instantiation and it’s nothing to do with Angular 2 and it is use to some initialization processing with respect to class hierarchies for the newly created instance. The ngOnInit event is an Angular 2 life-cycle event/ method that are called after the first ngOnChanges. The ngOnInit method is use to parameters defined with @Input otherwise the constructor is  OK .

angular 2 development environment

It might help you! https://angular.io/docs/ts/latest/quickstart.html https://www.youtube.com/watch?v=0scZXATiGSY