我在我的一个页面中使用了tabset视图。我已将每个标签分成每个html页面。我将它们作为模板使用ui-sref加载。
<div class="white-bg animated fadeIn">
<div class="row s-t-xs">
<div class="col-xs-10">
<div class="tabs-container">
<tabset class="tabs-left">
<tab id="tab1" heading="Job Preferences" ui-sref="user.education.jobs">
<div ng-include="'views/user/jobstab.html'"></div>
</tab>
<tab id="tab2" heading="Experience / Project Summary" ui-sref="user.education.experience">
<div ng-include="'views/user/experience.html'"></div>
</tab>
<tab id="tab3" heading="Educations / Certifications / Awards" ui-sref="user.education.certificate">
<div ng-include="'views/user/certificate.html'"></div>
</tab>
</tabset>
</div>
</div>
</div>
它正在发挥作用。我可以点击主页上的标签加载三个模板。 但是我在每个html页面都有一个按钮,单击该按钮会激活下一个标签的状态...
<div class="form-group">
<div class="col-md-10 col-sm-offset-9">
<button class="btn btn-primary" type="submit" ui-sref="user.education.experience">Save & Next</button>
</div>
</div>
即如果我点击上面的按钮,它应该激活“体验”。标签。 我可以看到,当我点击按钮而不是视图时,地址栏中的网址会发生变化。
这是我的国家提供者 $ stateProvider
.state('index', {
abstract: true,
url: "/index",
templateUrl: "views/common/content_user_navigation.html",
})
.state('landing', {
url: "/landing",
templateUrl: "views/landing.html",
data: { pageTitle: 'Awarded Me Home', specialClass: 'landing-page' }
})
.state('login', {
url: "/login",
templateUrl: "views/user/login.html",
data: { pageTitle: 'Login' }
})
.state('user.profile', {
url: "/profile",
templateUrl: "views/user/user_profile.html",
})
.state('user.education', {
url: "/education",
templateUrl: "views/user/education1.html",
})
.state('user.education.jobs', {
url: "/jobs",
templateUrl: "views/user/jobstab.html",
data: { pageTitle: 'Job Preferences' },
})
.state('user.education.experience', {
url: "/experience",
templateUrl: "views/user/experience.html",
data: { pageTitle: 'Experience' },
})
.state('user.education.certificate', {
url: "/certificate",
templateUrl: "views/user/certificate.html",
data: { pageTitle: 'Education' },
})
关于这个问题的任何想法?