ui-router is through the position of state进行页面跳转控制的,具体来说,当一个页面加载了ui-router及其相关router配置后(上面的示例代码),会跟据地址栏的url加载对应的模板,比如上文,如果访问了/a这个路径,ui-router会知道这个/a路径对应a这个state,他的模板是app/a/a.html,之后就会加载这个模板,并把它塞到ui-view这个directive (this may not be very appropriate, because state can be inherited and views can also be nested, which is a far stretch)
It is recommended to take a good look at the ui-router wiki
ui-router is through the position of
state
进行页面跳转控制的,具体来说,当一个页面加载了ui-router
及其相关router
配置后(上面的示例代码),会跟据地址栏的url加载对应的模板,比如上文,如果访问了/a
这个路径,ui-router会知道这个/a
路径对应a
这个state
,他的模板是app/a/a.html
,之后就会加载这个模板,并把它塞到ui-view
这个directive
(this may not be very appropriate, because state can be inherited and views can also be nested, which is a far stretch)It is recommended to take a good look at the ui-router wiki