需要在Visual Studio 2017中从angular2验证angular4 [英] need to verify angular4 from angular2 in visual studio 2017
问题描述
我已将源代码从Angularjs2升级到Angularjs4.
I have upgraded my source from Angularjs2 to Angularjs4.
我正在使用Visual Studio 2017和ASP.NET MVC Core.
I am using Visual studio 2017 and ASP.NET MVC Core.
我现在想验证我是否正在使用更新的版本(4)或上一个版本(2).
I want to verify now either i am using the updated version (4) or previous one (2).
这是我的package.json
here is my package.json
{
"name": "angular-quickstart",
"version": "1.0.0",
"description": "QuickStart package.json from the documentation, supplemented with testing support",
"scripts": {
"build": "tsc -p src/",
"build:watch": "tsc -p src/ -w",
"build:e2e": "tsc -p e2e/",
"serve": "lite-server -c=bs-config.json",
"serve:e2e": "lite-server -c=bs-config.e2e.json",
"prestart": "npm run build",
"start": "concurrently \"npm run build:watch\" \"npm run serve\"",
"pree2e": "npm run build:e2e",
"e2e": "concurrently \"npm run serve:e2e\" \"npm run protractor\" --kill-others --success first",
"preprotractor": "webdriver-manager update",
"protractor": "protractor protractor.config.js",
"pretest": "npm run build",
"test": "concurrently \"npm run build:watch\" \"karma start karma.conf.js\"",
"pretest:once": "npm run build",
"test:once": "karma start karma.conf.js --single-run",
"lint": "tslint ./src/**/*.ts -t verbose"
},
"keywords": [],
"author": "",
"license": "MIT",
"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-in-memory-web-api": "~0.3.0",
"systemjs": "0.19.40",
"core-js": "^2.4.1",
"rxjs": "5.0.1",
"zone.js": "^0.8.4"
},
"devDependencies": {
"concurrently": "^3.2.0",
"lite-server": "^2.2.2",
"typescript": "~2.1.0",
"canonical-path": "0.0.2",
"tslint": "^3.15.1",
"lodash": "^4.16.4",
"jasmine-core": "~2.4.1",
"karma": "^1.3.0",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-jasmine": "^1.0.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~4.0.14",
"rimraf": "^2.5.4",
"@types/node": "^6.0.46",
"@types/jasmine": "2.5.36"
},
"repository": {}
}
,然后我通过程序包管理器还原了.
and then i restored through package manager.
我是否必须升级tsconfig.js和任何其他文件中的内容?
will i have to upgrade something in tsconfig.js and any other file(s) ?
推荐答案
转到您的项目文件夹的以下路径:
Follow to this path to your project folder :
node_modules -> @angular -> core -> package.json
然后在该文件上检查"_id",例如:
then check for "_id" on that file, for example :
"_id": "@angular/core@4.1.3"
最后的版本号是您的实际棱角版本.
the version number at end is your actual angular version.
这篇关于需要在Visual Studio 2017中从angular2验证angular4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!