Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Add example of query string parameters for routes #631

@brandonroberts

Description

@brandonroberts

There aren't any examples of using query string parameters for primary/nested routes. Issue brought up here: angular/angular#6204 (comment)

@Component({...})
@RouteConfig([
    { path: '/', component: HomeComponent, name: 'Home' }
])
class AppComponent {
}

@Component({...})
class HomeComponent {
    constructor(params: RouteParams) {
        let id = params.get('id'); // id == 12345
    }
}
    <a [routerLink]="['/Home', {id: 12345}]">Home 12345</a> <!-- will navigate to /?id=12345 -->

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions