项目作者: yezarela

项目描述 :
:wrench: Angular CLI for Nativescript. Generates component for Nativescript Angular projects
高级语言: JavaScript
项目地址: git://github.com/yezarela/tns-ng.git
创建时间: 2017-03-31T08:33:47Z
项目社区:https://github.com/yezarela/tns-ng

开源协议:MIT License

下载


Tns Ng

npm version

Angular CLI for Nativescript. Generates component for Nativescript Angular projects

Table of Contents

Installation

  1. npm install -g tns-ng

Usage

  1. tng --help

Generating Components and Services

  1. tng generate|g [type] [name]

You can use the tng generate (or just tng g) command to generate Nativescript Angular components:

  1. tng generate component my-component
  2. tng g component my-component # using the alias
  3. # components support relative path generation
  4. # if in the directory app/feature/ and you run
  5. tng g component my-component
  6. # your component will be generated in app/feature/my-component
  7. # but if you were to run
  8. tng g component feature/my-component
  9. # your component will be generated in app/feature/my-component
  10. # This will create four files:
  11. __my-component__/__my-component__.component.html
  12. __my-component__/__my-component__.component.ts
  13. __my-component__/__my-component__.component.android.css
  14. __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