Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ionic framework Ionic 2在登录后重定向用户_Ionic Framework_Ionic2 - Fatal编程技术网

Ionic framework Ionic 2在登录后重定向用户

Ionic framework Ionic 2在登录后重定向用户,ionic-framework,ionic2,Ionic Framework,Ionic2,在用户使用Auth0登录后,我尝试重定向到TabsPage 身份验证正在工作,并且*ngIf=“!auth.authenticated()”*ngIf=“auth.authenticated()”也在工作,但是如果我在/app/app.component.ts中使用this.auth.authenticated(),它总是返回false 结构如下: 登录页 塔布斯帕奇 主页 安置 我按照本教程添加了Auth0你能给我们看看你的打字脚本代码吗?可能是f.e.异步问题?您的app.modu

在用户使用Auth0登录后,我尝试重定向到TabsPage

身份验证正在工作,并且
*ngIf=“!auth.authenticated()”
*ngIf=“auth.authenticated()”
也在工作,但是如果我在/app/app.component.ts中使用
this.auth.authenticated()
,它总是返回false

结构如下:

  • 登录页

  • 塔布斯帕奇

    • 主页
    • 安置

我按照本教程添加了Auth0

你能给我们看看你的打字脚本代码吗?可能是f.e.异步问题?您的
app.module.ts
看起来像什么?我在迁移到RC0时也遇到过同样的问题,这是因为
tokenGetter
没有正确定义。@sebafereras我缺少一些代码(导入),但现在我有了与示例相同的代码,我的浏览器没有响应。您能给我们看一下您的typescript代码吗?可能是f.e.异步问题?您的
app.module.ts
看起来像什么?我在迁移到RC0时也遇到过同样的问题,这是因为
tokenGetter
没有正确定义。@sebafereras我丢失了一些代码(导入),但现在我有了与示例相同的代码,我的浏览器没有响应