In today’s episode, we’re moving from RC4 to RC5. RC5 is reported to be the last of the breaking changes before Go-Live, so it’s worth upgrading.
Here’s some cool resources to checkout for further deep diving on the RC5 migration:
- The Official Guide
- A Practical Guide - cool deep-dive from the field
You can always grab tagged source code on the GitHub repo which will be tagged day1, day2, etc.
You can Subscribe to my Fresh Bytecode channel for regular Java/Web-related screencasts, or if you’re just into Angular, checkout the YouTube Playlist where I update all the episodes in this series as they come out.
Here’s the cheat sheet to follow along at home…
[ ] Update package.json
with rc5 links (Ctrl-D is your friend)
- @angular stuff rc5
- forms to 0.3.0
- router to rc.1
[ ] Do an npm install
to fetch the new packages
[ ] Run ng serve
to prove the backward compatible action is working
[ ] Add app.module.ts
in root.
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
@NgModule({
declarations: [ AppComponent ],
providers: [ ],
imports: [ BrowserModule ],
bootstrap: [ AppComponent ]
})
export class AppModule { }
[ ] Updated your bootstrap in main.ts
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
platformBrowserDynamic().bootstrapModule(AppModule);
[ ] Move your directives into declarations
import { MenuComponent } from './menu';
import { FeedComponent } from './feed';
@NgModule({
declarations: [ AppComponent, FeedComponent, MenuComponent ],
[ ] Remove all your providers and declarations in app.componont.ts