我this.nav.push在Ionic中遇到了问题.我已经完成了登录/注册页面,但是当我登录时,我收到此错误消息.我必须从login.ts添加代码,例如home.ts(这是主页)?
运行时错误
未捕获(在承诺中):无效链接:HomePage
错误:未捕获(在承诺中):无效链接:主页d(http:// localhost:8100/build/polyfills.js:3:3991)at l(http:// localhost:8100/build/polyfills.js: 3:3244)at Object.reject(http:// localhost:8100/build/polyfills.js:3:2600)at NavControllerBase._fireError(http:// localhost:8100/build/main.js:45465:16) at NavControllerBase._failed(http:// localhost:8100/build/main.js:45453:14)位于http:// localhost:8100/build/main.js:45508:59 at t.invoke(http:// localhost:8100/build/polyfills.js:3:11562)在t.invoke的对象.onInvoke(http:// localhost:8100/build/main.js:4622:37)(http:// localhost:8100/build/polyfills.js:3:11502)在n.run(http:// localhost:8100/build/polyfills.js:3:6468)的http:// localhost:8100/build/polyfills.js:3: 3767 在t.invokeTask(HTTP://本地主机:8100 /构建/ polyfills.js:3:12256)在Object.onInvokeTask(HTTP://本地主机:8100 /构建/ main.js:4613:37)在t.在n.runTask(http:// localhost:8100/bu)的invokeTask(http:// localhost:8100/build/polyfills.js:3:12177)ild/polyfills.js:3:7153)
@edit:当我想登录我的应用程序时出现问题.这是登录的代码响应者.
login.ts
public login() {
this.showLoading()
this.auth.login(this.registerCredentials).subscribe(allowed => {
if (allowed) {
this.nav.push('HomePage');
} else {
this.showError("Access …Run Code Online (Sandbox Code Playgroud) ionic3 ×1