Skip to content

Feature: Using RouteParams without the hassle when I am not having routes #7969

@frodefi

Description

@frodefi

I have an app with just a single page, so no need for routing. But I need the query string parameters.

I cannot just inject RouteParams and do a this.myParam = this._params.get('myParam');, I need to do the following:

  1. bring in another component (RouteConfig)
  2. create a dedicated component with the router config and router base template (with <router-outlet></router-outlet>, which I really do not need)
  3. inject RouteParams in the component where I want to use the query string parameter

And then finally I am able to the query string parameter...

So I request the possibility to use RouteParams, or another component, without the "hassle" it currently is. I could of course bring in a 3rd party library or component (or write a component myself), but it would be nice if it was possible with Angular 2 itself.

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