Name: angular-router-ex
Owner: Kontur
Description: null
Created: 2017-08-07 11:47:19.0
Updated: 2018-02-05 11:00:59.0
Pushed: 2018-03-26 14:45:44.0
Homepage: null
Size: 551
Language: TypeScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Angular 5+ Router with custom route urls, route reusing/prerendering and more.
i angular-router-ex --save
Define some routes
rt const ROUTES: Routes = [
{path: "", component: HomeComponent},
{path: "/home", component: HomeComponent},
{path: "/about", component: AboutComponent},
{path: "/item/:id", component: ItemComponent},
Import angular-router-ex with your routes in main application module
rt {RouterExModule} from "angular-router-ex";
odule({
imports: [
...
RouterExModule.forRoot(ROUTES)
],
rt class AppModule {
Place router outlet in your root component template
ter-ex-outlet [autoScroll]="true"></router-ex-outlet>
Visit wiki for more documentation and examples.
checkout repo and run
i && npm start
default server port is 3000
run tests (unit + e2e)
run test
Demo project based on Angular Webpack Starter