Angular 脚手架

作者: 小学生的博客 | 来源:发表于2017-06-22 10:22 被阅读149次

    快速创建项目:

    • npm install -g @angular/cli
    • ng new PROJECT-NAME
    • cd PROJECT-NAME
    • cnpm install
    • ng serve
    • ng build
      //ng build --aot
      //ng build --prod

    添加新 Components、Services...
    Component
    ng g component my-new-component

    Directive
    ng g directive my-new-directive

    Pipe
    ng g pipe my-new-pipe

    Service
    ng g service my-new-service

    Class
    ng g class my-new-class

    Guard
    ng g guard my-new-guard

    Interface
    ng g interface my-new-interface

    Enum
    ng g enum my-new-enum

    Module
    ng g module my-module

    相关文章

      网友评论

        本文标题:Angular 脚手架

        本文链接:https://www.haomeiwen.com/subject/oymmottx.html