ui-router README

The project's README from github.com/angular-ui/ui-router. As one markdown file: README.md.

AngularUI Router  Build Status

Note: this is the Angular 1.x source for UI-Router version 1.x. If you are looking for the source for UI-Router version 0.x, it can be found here


The de-facto solution to flexible routing in angular


Tutorials | API Docs | Download stable (or Minified) | Guide | Sample App | FAQ | Report an Issue | Contribute | Help! |


Angular UI-Router is a client-side Single Page Application routing framework for AngularJS.

Routing frameworks for SPAs update the browser's URL as the user navigates through the app. Conversely, this allows changes to the browser's URL to drive navigation through the app, thus allowing the user to create a bookmark to a location deep within the SPA.

UI-Router applications are modeled as a hierarchical tree of states. UI-Router provides a state machine to manage the transitions between those application states in a transaction-like manner.

Get Started

Resources

Videos

Reporting issues and Contributing

Please read our Contributor guidelines before reporting an issue or creating a pull request.

ui-router (angular-ui/ui-router)

Searching Database…

13.4K ·GitHub
这是什么?UI-Router 是一个用于单页应用(SPA)的客户端路由框架,最初为 AngularJS 开发。它不是把 URL 直接映射到视图,而是把应用建模为一棵层级化的状态树。
它是用来替代 Angular 自带的路由器,还是别的东西?是的,它是一个可替代的路由框架:它不直接把 URL 映射到视图,而是使用状态机,状态可以相互嵌套,每个状态各自管理自己的视图、数据和切换过程。
怎样把它添加到我的项目里?获取稳定版(或压缩版)构建文件,然后按照对应框架的入门指南操作,因为 Angular 1、Angular 2+ 和 React 分别有不同的包。
它能用于现代的 Angular,还是只能用于 AngularJS?它有不同的版本:本仓库是 Angular 1.x(AngularJS)的源码,针对 Angular 2+ 和 React 则有各自独立的版本和包。
它还在积极开发中,还是现在基本已经属于遗留项目?README 指向一条较早的 0.x 遗留版本线,并附有自己的“Extras/Addons”包,说明它有很长的版本历史;它是一个成熟、长期维护的项目,而不是快速迭代的新工具。
为什么要用嵌套状态,而不是普通路由?嵌套状态让界面的每一层(例如布局、标签页、子标签页)都拥有自己的视图、数据和 URL 片段,因此深入应用内部导航时,只会更新相关的嵌套视图,而不必重新渲染整个页面。
我能收藏应用内部的某个深层位置吗?可以。因为状态切换会驱动浏览器的 URL(反之亦然),用户可以收藏或分享单页应用中任意深层状态的链接。
Creator
angular-ui
Size
13.1 MB
Stars
13.4K
Age
13y
Commits · 90 Days