Ionic 3 - CLI Generate does not make the module file

1

Hello! When I use the " ionic g page Example " command, it creates only three files, instead of 4.

-exemplo.html
-exemplo.scss
-exemplo.ts

However, I believe I need the example.module.ts because I am getting the following error in the modal: Uncaught (in promise) error: invalid link: PageName.

    
asked by anonymous 17.07.2017 / 18:32

1 answer

0

Apparently this was withdrawn from the ionic temporarily. There is a workaround for you to use this .module.ts creation behavior.

To re-create the file you have the possibility to downgrade the app scripts. To do this do the following:

  • Open the "package.json" file of your project. It is at the root of the Ionic project.
  • Within it, look for the json devDependencies property and change the "@ionic/app-scripts": "2.0.2" leaving the "@ionic/app-scripts": "1.3.7" version.
  • Delete the "node_modules" folder of the project.
  • Run the command npm install .
  • After executing the command to generate the new Page, the .module.ts will be created inside the folder along with the other files.

Note: This procedure is to use an earlier version of scripts where the creation of the modules was still in operation. In the new version "2.0.2" this option is not working. It is now at your discretion to use this step by step.

    
20.07.2017 / 14:34