ui-router stateProvider中state用‘.’不好用。使用'-'就可以请问为什么 代码如下
html
<body>
<a ui-sref="index">首页</a>
<a ui-sref="index_a">A</a>
<a ui-sref="index_b">B</a>
<a ui-sref="index_c">C</a>
<div ui-view></div>
</body>
相关js
$stateProvider
.state('index',{
url:'/index',
templateUrl:'tpls/index.html'
})
.state('index_a',{
url:'/a',
templateUrl:'tpls/a.html'
})
.state('index_b',{
url:'/b',
templateUrl:'tpls/b.html'
})
.state('index_c',{
url:'/c',
templateUrl:'tpls/c.html'
});