transfer 2 angular
This commit is contained in:
@@ -1,16 +1,14 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { ListLinksComponent } from './list-links/list-links.component';
|
||||
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
|
||||
import { LinksComponent } from './links/links.component';
|
||||
|
||||
const routes: Routes = [
|
||||
{ path: '', redirectTo: 'list-links', pathMatch: 'full' },
|
||||
{ path: 'list-links', component:ListLinksComponent },
|
||||
{ path: '**', component: PageNotFoundComponent }
|
||||
{ path: '', redirectTo: '/list-links', pathMatch: 'full'},
|
||||
{ path: 'list-links', component:LinksComponent }
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forRoot(routes, { useHash: true })],
|
||||
imports: [RouterModule.forRoot(routes, {useHash: true})],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class AppRoutingModule { }
|
||||
|
||||
Reference in New Issue
Block a user