Reputation: 331
We have a very big site that we are still running Angular2.0.0-beta.14 on. My boss wants me to upgrade it to the latest Angular. Is there a quick way to change all the redundant files to the new version in my TS files as there are way to much files to do it all by hand. Also i don't know what all the new imports will be. An example being our app.component.ts
import {Component} from 'angular2/core';
import {LoginComponent} from './loginpage'
import {DummyComponent} from './dummyComponent'
import {ROUTER_DIRECTIVES, RouteConfig} from 'angular2/router'
import {LandingPage}from'./landingPage'
import {DebtViewPage}from'./debtViewPage'
@Component({
selector: 'my-app',
directives: [LoginComponent,ROUTER_DIRECTIVES],
template: `<router-outlet></router-outlet>`
})
@RouteConfig([
{path: '/login-page', name : 'Login' , component : LoginComponent ,
useAsDefault: true },
{path:'/landing-page/...',name:'Landing',component:LandingPage}
])
export class AppComponent {
}
This is how it use to work in Angular2.0.0-beta14
How do i change this to latest Angular syntax. also do i have to update all these pages separately or is there a way i can update all of them at once.
Upvotes: 0
Views: 58
Reputation: 6335
There is no tool for upgrading your Angular App you can check below link it's check list for converting angular 2 app to angular 4. https://angular-update-guide.firebaseapp.com/
Upvotes: 1