Sign Up

Sign In

Forget Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

You must login to ask question.

Page has a @IonicPage decorator, but it does not have a corresponding “NgModule”

  • 0

I was working on page navigation in Ionic. After using ionic serve, I got this error:

The Page with .ts extension has a @IonicPage decorator, but it does not have a corresponding "NgModule".

Can anyone explain why I am getting this error.

Click to rate this post!
[Total: 0 Average: 0]
Share This Post
Share
  1. This is because the @IonicPage() decorator is for deep linking, this will register the page in ionic’s deep link system.

    You can remove the decorator if you don’t want deep link on that page.

    Or you can register that page in your YOURPAGE.module.ts with this code:

    @NgModule({
      declarations: [
        MyPage
      ],
      imports: [
        IonicPageModule.forChild(MyPage)
      ],
      entryComponents: [
        MyPage
      ]
    })
    

    You can find more information in the docs

    • 0
Leave an answer

Leave an answer

Browse

close