dragonmnl
dragonmnl

Reputation: 15558

How to define a custom folder structure in Ionic 3?

I defined a custom folder structure in my sample Ionic 3 app.

pages/
   ...
modules/
   ...

For some reason, it works normally when in device/emulator but not with prod environment. e.g.

npm run build --prod --aot

Error

Unexpected value 'null' exported by the module 'ListModule in .../src/modules/list/list.module.ts'

Full code: https://github.com/dragGH102/ngrx-ionic-with-ngrx-and-multiple-modules

Upvotes: 0

Views: 614

Answers (1)

Duannx
Duannx

Reputation: 8726

To solve your problem just change the way you export to ionic normal way:

export class ListComponent

And import it like this:

import { ListComponent } from "./components/list/list";

To run your app in device, use following command:

ionic cordova run android
(or)  ionic cordova run android --livereload (For live reload)

You can change android with ios.
To use live reload, make sure your device and your server (laptop) is connect in same wifi address. See more about Ionic CLI

Upvotes: 1

Related Questions