ng-cli + ionic-cli 常用命令

ng-cli

  • 创建新项目
    ng new/init <project-name> [options]

    跳过 npm i 指令 --skip-npm

  • 自动生成 compnent/pipe 等文件
    ng g <type> <name> [options]

    //默认在 app/ 下

    Component => ng g c
    Directive => ng g d
    Pipe => ng g p
    Service => ng g s

  • 项目启动
    ng serve

ionic-cli

  • 创建新项目
    ionic start [options] [template]
    template : tabs/sidemenu/blank default tabs

  • 自动生成 page/pipe 等文件
    ionic g <type> <name>

    Page => ionic g page
    Directive => ionic g directive
    Pipe => ionic g pipe
    Service => ionic g provider
    Component => ionic g component

  • 项目启动
    ionic serve

posted @ 2018-03-17 11:26  tt273z  阅读(699)  评论(0编辑  收藏  举报