Showing posts with label angular. Show all posts
Showing posts with label angular. Show all posts

Thursday, 13 April 2017

Angular Tips and Tricks

Angular Tips and Tricks


Router Configuration Details:

export class AppRoutingModule {
    // inspect router configuration and auth guard configs
    constructor(router: Router) {
        console.log("Routes: ", JSON.stringify(router.config, undefined, 2));
    }
}



Enable Tracing

RouterModule.forRoot(appRoutes,
               {enableTracing: true}
             {preloadingStrategy: PreloadAllModules})


Control Value Accessor 

A ControlValueAccessor acts as a bridge between the Angular forms API and a native element in the DOM.[1]