Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

skbkontur/angular-router-ex

Repository files navigation

Angular Router EX Build Status

Angular 5+ Router with custom route urls, route reusing/prerendering and more.

Install

npm i angular-router-ex --save

Usage

Define some routes

export 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

import {RouterExModule} from "angular-router-ex";

@NgModule({
    imports: [ 
        ...
        RouterExModule.forRoot(ROUTES)
    ],
})
export class AppModule {
...
}

Place router outlet in your root component template

<router-ex-outlet [autoScroll]="true"></router-ex-outlet>

Visit wiki for more documentation and examples.

Demo Project

checkout repo and run

npm i && npm start

default server port is 3000

run tests (unit + e2e)

npm run test

Demo project based on Angular Webpack Starter

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •