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

后端 未结 11 2485
花落未央
花落未央 2020-12-16 11:06

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

11条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-16 11:43

    This is because @IonicPage() decorator is utilized for deep linking and lazy loading, so to implement that, you need a dedicated module to load all the required components for that page. Take a look at the Ionic docs:

    @IonicPage API docs

提交回复
热议问题