Skip to content

Variable state segments #45

Description

@PaulTondeur

Some segments of the state might be dynamic. Say the current locale for example.

Validating such state could be handled in a stateValidationResponder. Alternatively it might be an idea to introduce variable state segments.{locale}/home for example. These variables could be entered when needed. For example:

var home = new navigatorjs.NavigationState("{locale}/home")

var currentState = new navigatorjs.NavigationState("en_EN/home")

expect(currentState.equals(home, {locale:'en_EN'})).toBe(true)
expect(currentState.equals(home, {locale:'nl_NL'})).not.toBe(true)

Would this be a good idea?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions