Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support first class static and dynamic routing #23

Open
effervescentia opened this issue Feb 23, 2019 · 0 comments
Open

support first class static and dynamic routing #23

effervescentia opened this issue Feb 23, 2019 · 0 comments

Comments

@effervescentia
Copy link
Owner

  • decorator: @route(/app/{name: string}) applies the component with a string prop name

    • extracts the captured pattern \w+ which means the second argument is inferred to be of type (string) -> 'a and further infers the decorated view accepts the parameters declared in the output object
    • static version: @route("/app/settings")
  • directive / property: <div :route="/login" />

    • dynamic version: <div :route={/items?id={id: number}} /> applies the component with a number prop id
  • declarative:

router CustomRouter {
  /app: MyAppView;
  /item/{type: string}/info: SomeModelView;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant