Search code examples
angularnativescriptnativescript-angular

Migration module that is located in subdirectory


I am migrating an Angular app to NativeScript using a code-sharing structure.

To migrate the Angular modules, I am using:

ng g migrate-module --name=nameModule

But this command assumes that the module is under the folder /app, and to have the project better organised I have the modules in a folder app/modules.

Is there a way to indicate the path of the module? I have tried:

ng g migrate-module --name=modules/nameModule

But is not working


Solution

  • In the cases of modules with non-standard file names, you can provide a full path to the module by using the --module-path paramet

    Example:

    ng g migrate-module --name=nameModule --module-path=modules/myModule-md.ts
    

    ref: https://docs.nativescript.org/angular/code-sharing/migrating-a-web-project