加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

angularjs – 对于Angular 2到4的迁移,package.json中的更改

发布时间:2020-12-17 10:24:40 所属栏目:安全 来源:网络整理
导读:目前,该应用程序是在Angular 2.0.0上.为了与Angular 4兼容,需要更改哪些包或依赖项? 到目前为止,我改变了以下内容, "dependencies": {"@angular/common": "4.0.0","@angular/compiler": "4.0.0","@angular/core": "4.0.0","@angular/forms": "4.0.0","@angu
目前,该应用程序是在Angular 2.0.0上.为了与Angular 4兼容,需要更改哪些包或依赖项?
到目前为止,我改变了以下内容,
"dependencies": {
"@angular/common": "4.0.0","@angular/compiler": "4.0.0","@angular/core": "4.0.0","@angular/forms": "4.0.0","@angular/http": "4.0.0","@angular/platform-browser": "4.0.0","@angular/platform-browser-dynamic": "4.0.0","@angular/router": "4.0.0","@angular/router-deprecated": "2.0.0-rc.2","@angular/upgrade": "4.0.0","angular2-toaster": "2.0.0","rxjs": "^5.0.1","typescript": "^2.1.5","zone.js": "^0.8.4"
}

是否还有其他需要更改的包/依赖项?

我应该更改tsconfig.json吗?

{


 "compilerOptions": {
    "target": "es5","module": "commonjs","lib": [
      "es5","es2015","es2017","dom","scripthost"
    ],"emitDecoratorMetadata": true,"experimentalDecorators": true,"sourceMap": true,"noEmitHelpers": true,"allowNonTsExtensions" : true
  },"exclude": [
    "node_modules","typings/main.d.ts","typings/main"
  ],"filesGlob": [
    "./src/**/*.ts","./test/**/*.ts","!./node_modules/**/*.ts","src/custom_typings.d.ts","typings/browser.d.ts"
  ],"awesomeTypescriptLoaderOptions": {
    "resolveGlobs": true,"forkChecker": true
  },"compileOnSave": false,"buildOnSave": false,"atom": { "rewriteTsconfig": false }
}
我通常在这里使用这些文件作为指导: https://github.com/angular/quickstart

它提供了应用程序所需的一组基本种子文件,它通常与Angular保持同步,因为它是angular.io中Angular文档的一部分.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读