Angular Routing and Guards

routing guards

This article on Routing in Angular is part of the Learning Angular series. In the app, we will have 3 sections:1. Home2. Servers– View and Edit Servers– A service is used to load and update Servers3. Users– View users. Setting Up and Loading Routes In the AppModule import { Routes, RouterModel } […]

Read more

Component Lifecycle in Angular

component lifecycle

This article on Component Lifecyle in Angular is part of the Learning Angular series. Understanding the Component Lifecycle ngOnChanges – Called after a bound input property changes. Called during initialization. Called multiple times. ngOnInit – Called when the component is initialized. it will run after the constructor ngDoCheck – Called during every […]

Read more

Angular Directives

This article on Angular Directives is part of the Learning Angular series. Understanding Angular Directives Directives are instructions in the DOMReceives a Green Background @Directive({ selector: ‘[appTurnGreen]’ }) export class TurnGreenDirective { … } Using ngIf to output data conditionally Usage:Created Server {{ serverName }}TODOAnything can be passed to the *ngIf directive […]

Read more

Angular Components & Modules

angular componentsa nd modules

This article on Angular components is part of the Learning Angular series. Components form the building blocks of the framework and is defined using the @Component decorator. The decorator takes in the selector, template, styles and other properties which specify the metadata require to process the component. Default Angular Component – AppComponent […]

Read more