I create a new Angular app using dotnet new angular
which currently specifies Angular 4.2.5
in the package.json. I run the app and view source and ng-version
is 4.2.5
which is correct.
I then specify Angular to use 4.4.6
in the package.json:
"devDependencies": {
"@angular/animations": "^4.4.6",
"@angular/common": "^4.4.6",
"@angular/compiler": "^4.4.6",
"@angular/compiler-cli": "^4.4.6",
"@angular/core": "^4.4.6",
"@angular/forms": "^4.4.6",
"@angular/http": "^4.4.6",
"@angular/platform-browser": "^4.4.6",
"@angular/platform-browser-dynamic": "^4.4.6",
"@angular/platform-server": "^4.4.6",
"@angular/router": "^4.4.6"
I completely remove the node_modules
folder and run npm install
. After install, I check .\node_modules\@angular\common\package.json
and it shows a 4.4.6
version. However, when I run the app, ng-version
still shows 4.2.5
. Why does it still show 4.2.5
? How do I fix this?
Appears to have been a caching issue. Doing a Ctrl+F5 made the correct version appear.