Hi.
I would like to create a new component within my app. For example into Angular 2 to create a component we are usingng generate component myNewComponent
How can I do the same in NativeScript?
Thanks.
@sarn3792 for VSCode there is a nice extension which can generate files with snippets for Angular based project. You can find it here
@sarn3792 this one might be a bit better, as it generates {N} friendly files :)
https://marketplace.visualstudio.com/items?itemName=joshdsommer.vscode-add-angular-native-files
Thanks!
But what about if I am not using VSCode? Is it not possible?
@sarn3792 at this moment there is no CLI command for generating such files. Of course there is the --template option which allows you to create a new project with pre-defined templates.
e.g.
tns create myAngularApp --template ng
or the shorthanded version
tns create myAngularApp --template ng
or providng your own template
tns create myAngularApp --template <path-to-template>