angular-new-router-latest
v0.6.0
Published
A new router for both Angular 1 and Angular 2
Downloads
2
Readme
Component Router
A new router for Angular 1.5 and 2.0, written with TypeScript.
NOTE: The dist output was compiled from commit 7df14e42
State of this project
For now, the code has been moved to angular/angular. APIs are still rapidly changing, so I don't recommend using this in an important production app quite yet.
See the Angular Weekly Meeting Notes for updates.
NOTE: Everything below is out-of-date, but left for posterity.
Trying the router
You can install the router via npm
:
npm install angular-new-router
The documentation is pretty sparse. See the examples/
directory in this repo for now.
Goals
This router aims to fulfill the requirements mentioned in the Angular 2.0 router design document.
Below is a short summary of these goals:
- Have sensible conventions and defaults
- Be customizable at almost every point
- Support sibling "viewports" (like
ng-view
s in Angular 1.x's ngRoute) - Support nested routers
- Allow components to encapsulate entire parts of an application
- Expose a "navigation model" which can be used to generate a navigation UI (like menus)
- Expose which route in the model is active (useful in styling/highlighting links in the menu)
- Generate
href
s based on router hierarchies - Lazy-load components
- Be able to reuse component instances
- Use either push state or hash change mode
- Handle updating the document title
Prior Art
License
Apache 2