I've this...
this.router.navigate(['search', this.searchParameters]);
that's generates something like '/search;text=test;dateFrom=12-10-2016'
that's works fine !
However...if I refresh my browser or press enter on the URL address bar, I will got a 404...
Cannot GET /search;text=test;dateFrom=12-10-2016
Using angular 2 beta it's used to work because the beta was using the standard query string format like ?text=test&dateFrom=12-10-2016.
Now, the final Angular 2 uses Url Matrix Notation to handle parameters that's came from the URL.
Any clue about how to make this work ?
Not sure if it's helps, but this is my app.routing.ts
import { ModuleWithProviders } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { HomeComponent } from './components/pages/home/home.component';
import { SearchComponent } from './components/pages/search/search.component';
const appRoutes: Routes = [
{
path: '',
redirectTo: '/home',
pathMatch: 'full'
},
{
path: 'search',
component: SearchComponent
}
];
export const routing: ModuleWithProviders = RouterModule.forRoot(appRoutes);
Also, i've this on my gulp/browserSync...
browserSync.init({
server: {
baseDir: "./",
routes: {
"/home": "index.html",
"/search": "index.html"
}
}
});