# Page modules and lazy loading

**URL:** <https://forum.ionicframework.com/t/page-modules-and-lazy-loading/124073>\
**Category:** ionic-v3\
**Created:** [March 9, 2018, 10:53pm UTC](https://forum.ionicframework.com/t/page-modules-and-lazy-loading/124073 "2018-03-09T22:53:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bwhiting](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/bwhiting/32/117866_2.png) [@bwhiting](https://forum.ionicframework.com/u/bwhiting)\
**Post date:** [March 9, 2018, 10:53pm UTC](https://forum.ionicframework.com/t/page-modules-and-lazy-loading/124073/1 "2018-03-09T22:53:29Z")

</div>

I’ve been creating my pages with the ionic CLI where it creates a page module for each page. But the tutorials I’ve been following just have me adding the pages directly to the app module and as variables when I push them onto the nav controller.

When I try and run ionic build prod it complains that I have the page declared in more than one module. Also, I would like to set up lazy loading for some pages. Can someone point me to a tutorial or an example that shows the proper use here?

---

<div class="post-metadata">

**Author:** ![user5555](https://avatars.discourse-cdn.com/v4/letter/u/8e7dd6/32.png) [@user5555](https://forum.ionicframework.com/u/user5555)\
**Post date:** [March 9, 2018, 11:03pm UTC](https://forum.ionicframework.com/t/page-modules-and-lazy-loading/124073/2 "2018-03-09T23:03:01Z")

</div>

Delete the page modules with you don’t want to be lazy loaded. and remove the lazy loaded pages from your app module.

---

<div class="post-metadata">

**Author:** ![robinyo](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/robinyo/32/115964_2.png) [@robinyo](https://forum.ionicframework.com/u/robinyo)\
**Post date:** [March 9, 2018, 11:40pm UTC](https://forum.ionicframework.com/t/page-modules-and-lazy-loading/124073/3 "2018-03-09T23:40:44Z")

</div>

See: [New page Created Module.ts file](https://forum.ionicframework.com/t/new-page-created-module-ts-file/85839/28)

And take a look at:

- [https://robferguson.org/blog/2017/12/31/the-future-of-the-ionic-cli/](https://robferguson.org/blog/2017/12/31/the-future-of-the-ionic-cli/)
- [https://github.com/Robinyo/ionic-angular-schematics](https://github.com/Robinyo/ionic-angular-schematics)

I used **ionic-angular-schematics** to create the scaffolding for ‘Brew - The Craft Beer App’: [https://craftbeer.org.au/](https://craftbeer.org.au/)

 ![location](https://global.discourse-cdn.com/ionicframework/original/3X/a/a/aa5116c33c46f385c36be0e44b9cca43026d982b.png)

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:46pm UTC](https://forum.ionicframework.com/t/page-modules-and-lazy-loading/124073/4 "2021-07-19T21:46:04Z")

</div>

Closed on July 19, 2021, 9:46pm UTC


