title | layout | excerpt | sitemap | permalink |
---|---|---|---|---|
UI-Router for Angular (2+) |
single |
State based routing for Angular (2+) |
true |
/ng2/ |
{% include toc icon="columns" title="Angular (2+)" %}
<iframe style="display: inline-block;" src="https://ghbtns.com/github-btn.html?user=ui-router&repo=ng2&type=fork&count=true&size=large" frameborder="0" scrolling="0" width="160px" height="30px"></iframe><iframe style="display: inline-block;" src="https://ghbtns.com/github-btn.html?user=ui-router&repo=ng2&type=star&count=true&size=large" frameborder="0" scrolling="0" width="160px" height="30px"></iframe>
UI-Router provides extremely flexible, state based routing to the Angular (2+) ecosystem.
The UI-Router package is distributed using npm, the node package manager.
npm install --save ui-router-ng2
Other examples:
- Adding a specific version to your project:
npm install --save [email protected]
- From http://jsdelivr.com via a
<script>
tag in your html:- Latest stable version:
<script src="//cdn.jsdelivr.net/npm/ui-router-ng2/_bundles/ui-router-ng2.js"></script>
- A specific version:
<script src="//cdn.jsdelivr.net/npm/[email protected]/_bundles/ui-router-ng2.js"></script>
- Latest stable version:
- From http://unpkg.com via a
<script>
tag in your html:- Latest stable version:
<script src="//unpkg.com/ui-router-ng2/_bundles/ui-router-ng2.js"></script>
- A specific version:
<script src="//unpkg.com/[email protected]/_bundles/ui-router-ng2.js"></script>
- Latest stable version:
Learn UI-Router by following our tutorials.
The UI-Router Ng2 QuickStart is a minimalistic Angular (2+) UI-Router app forked from the official Angular Quickstart. It demonstrates:
- States and nested substates
- Path, Query, and Hash parameters
- Resolve data
- Named Views
The UI-Router Sample App is a non-trivial UI-Router application.
To fix a UI-Router bug, or create an enhancement, follow these steps:
The Typescript source code for UI-Router for Angular (2+) can be found at https://github.com/ui-router/ng2 UI-Router for Angular (2+) depends on UI-Router Core, which can be found at https://github.com/ui-router/core
To get started:
git clone https://github.com/ui-router/ng2 ui-router-ng2
git clone https://github.com/ui-router/core ui-router-core
cd ui-router-core
npm install
npm link
npm run build
cd ../ui-router-ng2
npm install
npm link ui-router-core
npm run build