https://github.com/yezarela/tns-ng
:wrench: Angular CLI for Nativescript. Generates component for Nativescript Angular projects
https://github.com/yezarela/tns-ng
angular angular-cli nativescript
Last synced: 6 days ago
JSON representation
:wrench: Angular CLI for Nativescript. Generates component for Nativescript Angular projects
- Host: GitHub
- URL: https://github.com/yezarela/tns-ng
- Owner: yezarela
- License: mit
- Created: 2017-03-31T08:33:47.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-05-11T07:21:48.000Z (about 8 years ago)
- Last Synced: 2025-04-20T05:03:27.533Z (29 days ago)
- Topics: angular, angular-cli, nativescript
- Language: JavaScript
- Homepage:
- Size: 8.79 KB
- Stars: 8
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Tns Ng
[](https://badge.fury.io/js/tns-ng)
Angular CLI for Nativescript. Generates component for Nativescript Angular projects
## Table of Contents
* [Installation](#installation)
* [Usage](#usage)
* [Generating Components and Services](#generating-components-and-services)
* [Contributing](#contributing)## Installation
```bash
npm install -g tns-ng
```## Usage
```bash
tng --help
```### Generating Components and Services
```
tng generate|g [type] [name]
```
You can use the `tng generate` (or just `tng g`) command to generate Nativescript Angular components:```bash
tng generate component my-component
tng g component my-component # using the alias# components support relative path generation
# if in the directory app/feature/ and you run
tng g component my-component
# your component will be generated in app/feature/my-component
# but if you were to run
tng g component feature/my-component
# your component will be generated in app/feature/my-component# This will create four files:
__my-component__/__my-component__.component.html
__my-component__/__my-component__.component.ts
__my-component__/__my-component__.component.android.css
__my-component__/__my-component__.component.ios.css
```
You can find all possible types in the table below:Scaffold | Usage
--- | ---
Component | `tng g component my-component`
Service | `tng g service my-service`## Contributing
Just fork and pull request :D