Jquery 从Google API成功登录后如何重定向到其他组件
我正在用firebase在angular2中创建一个应用程序。我已经在我的应用程序中配置了firebase。我给出了一个登录按钮,它调用GoogleLogin方法。在这个按钮下,我使用了signinpop方法。成功登录后,我想重定向到其他组件,找不到任何合适的在线帮助,而且我在index.html页面中使用了一些css和jquery来实现滚动效果(ui.component.html)。问题是当我路由到另一个页面时(路由)按后退浏览器后退按钮,滚动效果不起作用 图片: 这是我的ui.component.htmlJquery 从Google API成功登录后如何重定向到其他组件,jquery,html,firebase,angular2-routing,Jquery,Html,Firebase,Angular2 Routing,我正在用firebase在angular2中创建一个应用程序。我已经在我的应用程序中配置了firebase。我给出了一个登录按钮,它调用GoogleLogin方法。在这个按钮下,我使用了signinpop方法。成功登录后,我想重定向到其他组件,找不到任何合适的在线帮助,而且我在index.html页面中使用了一些css和jquery来实现滚动效果(ui.component.html)。问题是当我路由到另一个页面时(路由)按后退浏览器后退按钮,滚动效果不起作用 图片: 这是我的ui.compone
<section class="projects">
<div class="row">
<h2>Want to see Projects — Simple as 1,2,3</h2>
</div>
<div class="row">
<div class="col span_1_of_2 steps_box">
<img src="../assets/image/projectimage.png" class="mobile_screen js--wp-2">
</div>
<div class="col span_1_of_2 steps_box">
<div class="work_step clearfix">
<div>1</div>
<p>We have quite a good list of projects in jquery and JavaScript,want to see the projects-keep reading</p>
</div>
<div class="work_step clearfix">
<div>2</div>
<p> It's free -yes you heard correct, Just Sign In with your Gmail Account </p>
</div>
<div class="work_step clearfix">
<div>3</div>
<p>Access the pandora of projects .It will surely help you in learning JavaScript and jquery</p>
</div>
<a class="btn btn-full" href="#" (click)="loginWithGoogle()" >Login</a>
</div>
</div>
</section>
<br>
<br>
Javascript库
$(document).ready(function()
{
/* for sticky navigation ---*/
$('.js--section-features').waypoint(function(direction){
if(direction=="down")
{
$('nav').addClass('sticky');
}
else
{
$('nav').removeClass('sticky');
}
},
{offset:'60px;'}
);
/* for scroll buttons */
$('.js--scroll-to-Technology').click(function()
{
$('html,body').animate({scrollTop:$('.js--section-features').offset().top},1000)
})
$('.js--scroll-to-start').click(function()
{
$('html,body').animate({scrollTop:$('.js--scroll-section-form').offset().top},1000)
})
/* for scroll links */
$('.hello').click(function(){
$('html ,body').animate({scrollTop:$('.aboutme').offset().top},1000)
})
$('.project').click(function(){
$('html ,body').animate({scrollTop:$('.projects').offset().top},1000)
})
/*Animations on scroll----*/
$('.js--wp-1').waypoint(function(direction)
{
$('.js--wp-1').addClass('animated fadeIn');
},
{ offset:'50%'});
$('.js--wp-2').waypoint(function(direction)
{
$('.js--wp-2').addClass('animated fadeInUp');
},
{ offset:'50%'});
$('.js--wp-3').waypoint(function(direction)
{
$('.js--wp-3').addClass('animated fadeInUp');
},
{ offset:'50%'});
});
$(document).ready(function()
{
/* for sticky navigation ---*/
$('.js--section-features').waypoint(function(direction){
if(direction=="down")
{
$('nav').addClass('sticky');
}
else
{
$('nav').removeClass('sticky');
}
},
{offset:'60px;'}
);
/* for scroll buttons */
$('.js--scroll-to-Technology').click(function()
{
$('html,body').animate({scrollTop:$('.js--section-features').offset().top},1000)
})
$('.js--scroll-to-start').click(function()
{
$('html,body').animate({scrollTop:$('.js--scroll-section-form').offset().top},1000)
})
/* for scroll links */
$('.hello').click(function(){
$('html ,body').animate({scrollTop:$('.aboutme').offset().top},1000)
})
$('.project').click(function(){
$('html ,body').animate({scrollTop:$('.projects').offset().top},1000)
})
/*Animations on scroll----*/
$('.js--wp-1').waypoint(function(direction)
{
$('.js--wp-1').addClass('animated fadeIn');
},
{ offset:'50%'});
$('.js--wp-2').waypoint(function(direction)
{
$('.js--wp-2').addClass('animated fadeInUp');
},
{ offset:'50%'});
$('.js--wp-3').waypoint(function(direction)
{
$('.js--wp-3').addClass('animated fadeInUp');
},
{ offset:'50%'});
});