Ionic CLI启动:starterkit v3?

时间:2017-08-29 14:53:52

标签: angular typescript ionic3 ionic-cli

使用命令ionic start myapp tabs。我们从版本2检索starterkit。但是我想启动一个应用程序Ionic v3。离子CLI不是最新的?所有像其他命令一样:离子生成??

2 个答案:

答案 0 :(得分:2)

此CLI工作正常。

ionic start myapp tabs

您可以在package.json文件中看到,如下所示。"ionic-angular": "3.6.0",表示Ionic 3 app Angular 4+。没有问题。

{
  "name": "MediaApp",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "lint": "ionic-app-scripts lint",
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
  },
  "dependencies": {
    "@angular/common": "4.1.3",
    "@angular/compiler": "4.1.3",
    "@angular/compiler-cli": "4.1.3",
    "@angular/core": "4.1.3",
    "@angular/forms": "4.1.3",
    "@angular/http": "4.1.3",
    "@angular/platform-browser": "4.1.3",
    "@angular/platform-browser-dynamic": "4.1.3",
    "@ionic-native/core": "3.12.1",
    "@ionic-native/splash-screen": "3.12.1",
    "@ionic-native/status-bar": "3.12.1",
    "@ionic/storage": "2.0.1",
    "ionic-angular": "3.6.0",
    "ionicons": "3.0.0",
    "rxjs": "5.4.0",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.12"
  },
  "devDependencies": {
    "@ionic/app-scripts": "2.1.3",
    "typescript": "2.3.4"
  },
  "description": "An Ionic project"
}

答案 1 :(得分:0)

如果要在命令lind type

中更新到离子版本3
npm update -g ionic

然后它将更新为最新的离子版本,即离子3 然后转到您拥有代码的源代码文件,通过在Windows中右键单击Shift键然后您可以转到命令提示符,如果您使用git bash命令行,您只能通过ricght click.in命令行类型获取该命令提示符

ionic serve

然后按Enter键。 这件事对我有用