如何解决角引导程序浏览不会在下一页打开
所以我在我的应用程序中添加了引导浏览功能,但是我无法弄清一件事。 当我重定向到另一个页面时,如何继续显示游览。它仅对第一个主页有效。在第一个重定向中,我在本地存储中设置了值,所以我在其他控制器中获取了它,如果存在,它将触发在该页面上显示游览。提前致谢。如果您需要更多代码,我可以提供。 这是我的代码:
var tour = new Tour({
steps: [
{
element: "#panel1",title: "Welcome to MmmooOgle Ration",content: '<div class="embed-responsive embed-responsive-16by9" style="width:250px; height:260px;"><iframe width="1280" height="720" src="https://www.youtube.com" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>',placement: "bottom",onNext: function(){
localStorage.setItem('fromDashboard',true);
},},{
path: function redirect(state) {
$state.go('teams.myTeams');
},}
],backdrop: true,storage: false
});
// tour.init();
// tour.start();
tour.init();
// tour.start();
$("#startTourBtn").click(function() {
tour.restart();
});
在我重定向的其他控制器中:
var tour = new Tour({
steps: [
{
element: "#panel2",title: "2nd guide",content: "This is active herd",{
element: "#panel3",title: "3rd guide",content: "This is active group",placement: "bottom"
},{
element: "#panel4",title: "4th guide",content: "This is list of feeds",{
element: "#panel5",title: "5th guide",content: "This is list of rations",placement: "bottom"
}
],storage: false
})
tour.init();
if(vm.fromDashboard){
tour.restart();
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。