Skip to content

Instantly share code, notes, and snippets.

@jasonaden
Last active January 5, 2018 14:44
Show Gist options
  • Select an option

  • Save jasonaden/740ad7d99bdf5de9d330070c25d540ba to your computer and use it in GitHub Desktop.

Select an option

Save jasonaden/740ad7d99bdf5de9d330070c25d540ba to your computer and use it in GitHub Desktop.
common/router

@angular/common/router

Store

  • DONE Create RouterStore to hold RouteConfig objects
  • Helpers:
    • DONE getConfig(state: RouterState, id: number)

URL

  • Create URL parser to split into segments
    • DONE Path & matrix params parser
    • DONE Aux route parser
    • DONE Outlet parser
    • DONE Fragment parser
    • DONE Query params parser
    • DONE Create fully parsed format
  • Create redirect mechanism
  • Map segments to RouteConfig objects

Router

  • Create Router class & store reference to RouterStore
  • Create RouterConfig tuple storing non-serializable entities

Utils

  • Helper functions:
    • getComponent(state: RouterState, config: RouteConfig)

Activation

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