Skip to content

Suggestion: Throw error if user calls UIRouterReact.start() twice #65

@telekid

Description

@telekid

I burned a few hours attempting to fix an issue that was actually a side-effect of unintentionally calling start() on my router object twice – once in my router.config file (inspired by the sample app,) and then once again by passing router to the UIRouter component.

The trouble is, it isn't particularly obvious that passing a UIRouterReact class to a UIRouter component (<UIRouter router={router}></UIRouter>) automatically calls the start() method on router.

Since I can't actually think of any reason why a user would choose to call router.start() twice in the same application, it may be prudent to throw an error if a user attempts to do so.

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