我已经在tomcat服务器上部署了angular 4应用程序,但在使用okta进行身份验证后,即使我使用
navigateByUrl()
。
但在运行ng-serve命令时,这同样适用于节点js。
showProductsPage(){
this.router.navigateByUrl('/products');}
showLogin() {
this.oktaSignIn.renderEl({el: '#okta-login-container'}, (response)
if (response.status === 'SUCCESS') {
this.user = response.claims.email;
this.oktaSignIn.session.get((sessionResponse) => {
this.userId = sessionResponse.login.indexOf('@') > -1 ? sessionResponse.login.split("@")[0] : sessionResponse.login;
localStorage.setItem('tkid',this.userId);
this.showProductsPage();
//this.router.navigate(['products']);
});
}
我尝试了HashLocationStrategy,但不确定它在这种情况下如何帮助我