我正在使用带 Angular 2 的 nativescript。
我想知道如何在 Nativescript 项目中快速创建一个 ng 组件。
例如,在 Angular 2 中创建我们使用的组件 ng generate component hello
。
是否有 nativescript cli 解决方案?
最佳答案
您可以使用 https://github.com/sebawita/nativescript-angular-cli
要生成一个组件,运行:
tns generate component <component-name>
tns g c <component-name>
要在模块内创建组件,请运行:
tns generate component <component-name> <module-name>
tns g c <component-name> <module-name>
干杯
关于angular - 如何将 angular 2 组件创建到 Nativescript 应用程序中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41419592/