您好,欢迎来到二三娱乐。
搜索
您的当前位置:首页Angular2 2017-04-19

Angular2 2017-04-19

来源:二三娱乐

1. 资料汇总

2. Angular2 cli commend line interface

  • Generating Components, Directives, Pipes and Services . eg:
ng generate component my-new-component
ng g component my-new-component # using the alias

 # components support relative path generation
 # if in the directory src/app/feature/ and you run
 ng g component new-cmp
 # your component will be generated in src/app/feature/new-cmp
 # but if you were to run
 ng g component ../newer-cmp
 # your component will be generated in src/app/newer-cmp
  • All generate commend
Scaffold Usage
ng g component my-new-component
ng g directive my-new-directive
ng g pipe my-new-pipe
ng g service my-new-service
ng g class my-new-class
ng g guard my-new-guard
ng g interface my-new-interface
ng g enum my-new-enum
ng g module my-module
  • Updating Angular Cli
npm uninstall -g @angular/cli
npm cache clean
npm install -g @angular/cli@latest

Copyright © 2019- yule263.com 版权所有 湘ICP备2023023988号-1

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务