What Is Router imports? It is an optional service that presents a special component view for a given URL. It has own library package- @angular/router and It is not a part of an Angular core. The Angular package looks like this. import { Routes , RouterModule ,} from '@angular/router' ; And //Composability and Grouping //imports used for composing modules together. imports: [ BrowserModule , //enableTracing enables debugging purposes only //useHash enables the location strategy that uses the URL fragment instead of the history API. RouterModule . forRoot ( appRoots , { enableTracing: true , useHash: true }) ], For more detail kindly refer the link - https://www.code-sample.com/2018/05/angular-5-6-7-routing-and-navigation.html
Angular, React, JavaScript, Java, PHP, SQL, C#, Vue, NodeJs, TypeScript and Interview Questions Answers