Routing concepts in Angular2
Oct 30, 2020 05:07 0 Comments HTML FRAUSKY

import

{

Routes, RouterModule

}

from '@angular/router';

const routes: Routes = [ {

path: 'rating', component:

webformComponent

}

 {

path:

'news',component:NewsComponent

}

{

path: '', component:webformComponent

}

 {

path: '**', component:UnknownComponent

}

]:

 export const routedComponents = [AppComponent, webformComponent, NewsComponent,PrintComponent,UnknownComponent];

@NgModule(

{

imports : [CommonModule,RouterModule.forRoot(routes)], declarations:routedComponents, exports:

[RouterModule,EditorModule,CommonModule],

}

)

export class AppRoutingModule { }  

Prev Next
About the Author
Topic Replies (0)
Leave a Reply
Guest User

You might also like

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.


Let`s Connect