Reputation: 327
I'm relatively new to angular2, so I was wondering how could I update my version(1.1.4) to last version!
I'm working on version 2.0.0-rc.5 of angular2.
Already tried
npm install primeng --save
but package.json still holds this value: ""primeng": "^1.1.4","
the package.json from the root directory of angular, and also of the primeng in node_modules directory
Upvotes: 6
Views: 18076
Reputation: 327
For future references: Had to uninstall with:
npm uninstall primeng --save
Run the code below to avoid unnecessary errors:
npm cache verify
And then install with the version you want
npm install [email protected] --save
thanks for you answer though
Upvotes: 13
Reputation: 1219
Use "import {SidebarModule} from 'primeng/components/sidebar/sidebar';
"
instead "import { SidebarModule } from 'primeng/primeng';
"
Upvotes: -1
Reputation: 334
You only need run npm update --save
into the folder that contains your package.json
Before:
"dependencies": {
....
"primeng": "^1.1.4",
....
},
After:
"dependencies": {
....
"primeng": "^2.0.5",
....
},
Note: this command update whole your dependencies...
Upvotes: 3