如何更新离子2的稳定版本

时间:2017-04-08 06:39:10

标签: angular ionic2

我正在研究Ionic 2项目。我目前安装的版本如下图所示。它是离子2的稳定版吗?如果不是那么我应该更新哪个组件版本?

Your system information:

Cordova CLI: 6.2.0 
Ionic Framework Version: 2.3.0
Ionic CLI Version: 2.2.2
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 1.1.4
ios-deploy version: 1.9.1 
ios-sim version: Not installed
OS: OS X El Capitan
Node Version: v7.7.0
Xcode version: Xcode 8.1 Build version 8B62

这是我的package.json

   "dependencies": {
    "@angular/common": "2.4.8",
    "@angular/compiler": "2.4.8",
    "@angular/compiler-cli": "2.4.8",
    "@angular/core": "2.4.8",
    "@angular/forms": "2.4.8",
    "@angular/http": "2.4.8",
    "@angular/platform-browser": "2.4.8",
    "@angular/platform-browser-dynamic": "2.4.8",
    "@angular/platform-server": "2.4.8",
    "@ionic-native/core": "^3.1.0",
    "@ionic-native/geolocation": "^3.4.4",
    "@ionic-native/launch-navigator": "^3.4.4",
    "@ionic-native/splash-screen": "3.1.0",
    "@ionic-native/status-bar": "3.1.0",
    "@ionic/storage": "2.0.0",
    "font-awesome": "^4.7.0",
    "ionic-angular": "2.3.0",
    "ionic2-rating": "^1.2.0",
    "ionicons": "3.0.0",
    "rxjs": "5.0.1",
    "sw-toolbox": "3.4.0",
    "zone.js": "0.7.2"
  },
  "devDependencies": {
    "@ionic/app-scripts": "1.1.4",
    "typescript": "2.0.9"
  },

在Google console中显示lang.js:130 Angular is running in the development mode. Call enableProdMode() to enable the production mode.如何将其更新为Angular2

1 个答案:

答案 0 :(得分:1)

您可以在github上的changelog中找到明确的离线更新说明。

您安装的版本稳定,但还有更高版本。因此,您可以观察更改并确定是否需要更新。

您可以在Angular中启用生产模式,方法是从其核心导入同名函数并在引导之前调用它。

import { enableProdMode } from '@angular/core'

enableProdMode()
bootstrap()