位于子目录中的迁移模块

Migration module that is located in subdirectory

我正在使用代码共享结构将 Angular 应用程序迁移到 NativeScript。

要迁移 Angular 模块,我正在使用:

ng g migrate-module --name=nameModule

但是此命令假定模块位于文件夹 /app 下,为了更好地组织项目,我将模块放在文件夹 app/modules.

有没有办法指明模块的路径?我试过:

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

但是不工作

对于具有非标准文件名的模块,您可以使用 --module-path 参数

提供模块的完整路径

示例:

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

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

这就是实际命令的样子。我的模块位于

src/app/features/scheduler/scheduler.module.ts

ng g migrate-module --name=scheduler --module-path=features/scheduler/scheduler.module.ts