Correspondência curinga do roteador angular 3
O que há de errado com a seguinte configuração de rota? Eu sempre sou navegado para**
mesmo se houver uma rota paraapp/jungle
.
import {bootstrap} from '@angular/platform-browser-dynamic';
import { RouterConfig, provideRouter } from '@angular/[email protected]'
import {App} from './app';
import { HomeComponent } from './home.component';
import { JungleComponent } from './jungle.component';
import { NotFoundComponent } from './not-found.component';
const APP_ROUTES: RouterConfig = [
{
path: '', pathMatch: '', redirectTo: 'app/home'
},
{
path: 'app/', pathMatch: '', redirectTo: 'app/home'
},
{
path: 'app/home', component: HomeComponent
},
{
path: 'app/jungle', component: JungleComponent
},
{
path: '**', component: NotFoundComponent
}
]
bootstrap(App, [provideRouter(APP_ROUTES)])
.catch(err => console.error(err));
Aqui é um afunilador.Estou usando o @ angular / router @ 3.0.0-beta.2