I downloaded and installed ("npm install") the most up2date angular2 project with rc5 dependencies from angular2 quickstart on github. I saw that angular-cli's package has rc4 dependencies on their github.
How does one install angular-cli that support rc5 dependencies?
I had significant issues when trying to use the webpack update. If you do as well, you can alternatively still use the beta.10 version of the CLI with RC5 without too much trouble until they get some of the problems ironed out.
Create a new project, if you don't already have one. In the project's package.json file, update all of the angular dependencies to RC5, like so:
...
"@angular/common": "2.0.0-rc.5",
"@angular/compiler": "2.0.0-rc.5",
"@angular/core": "2.0.0-rc.5",
"@angular/forms": "^0.2.0",
"@angular/http": "2.0.0-rc.5",
"@angular/platform-browser": "2.0.0-rc.5",
"@angular/platform-browser-dynamic": "2.0.0-rc.5",
...
Save the package.json, and then, run npm install.
After that, you will manually have to set up a module for your app and update its bootstrapper. To see how to do this: visit Angular's official RC4 to RC5 migration guide.
You can use the CLI to build, serve, test, and create new components, services as usual, but the way you import dependencies is different, as per RC5.
See also:
Angular Modules Guide
Updating Your Angular 2 App From RC4 to RC5
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With