use*_*445 10 javascript angularjs angular-ui angular-ui-router
这是我的代码:
.state('profile',{
url : '/profile',
templateUrl: 'views/user.html',
controller: 'UserCtrl'
})
.state('profile.forgot',{
url : '/delivers',
templateUrl: 'views/user_forgot.html', <- this template not appear, when state is active
controller: 'forgotCtrl'
})
<a ui-sref="profile.forgot">Forgot your pasword?</a>
<div class="panel" ui-view=""></div>
Run Code Online (Sandbox Code Playgroud)
当我点击链接时,在ui-view中出现了父状态的模板和控制器.AngularJS版本是1.2.0-rc.2
| 归档时间: |
|
| 查看次数: |
6284 次 |
| 最近记录: |