使用 Angular-ui-router,我如何使用否则方法 on $stateProvider或者我该如何使用它?
你不能只使用$stateProvider
.
你需要注射$urlRouterProvider
并创建类似于以下的代码:
$urlRouterProvider.otherwise('/otherwise');
The /otherwise
url 必须像往常一样在状态上定义:
$stateProvider
.state("otherwise", { url : '/otherwise'...})
请参阅此链接在哪里克斯珀林解释说
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)