With the final release of Angular 2.0, our application needs to undergo the migration. I am first migrating from RC4 to RC5 and then to final. I followed the migration steps from barbarianmeetscoding-updating-your-angular-2-app-from-rc4-to-rc5-a-practical-guide and also from angular.io - rc4-to-rc5.html.
Our application is a big application with 100 odd components. My question is , for the migration to be successful, should I make changes to all components at once or can I take them one component at a time?
I have made the necessary changes to main.ts, package.json , app.ts and introduced app.module.ts. To begin with I moved the component directives and providers from app.ts to app.module and made necessary changes in app.routes.
But I get the following error
But there is no explicit use of toString() in the mentioned component.
app.module.ts
import { NgModule, CUSTOM_ELEMENTS_SCHEMA} from '@angular/core';
import * as ngCore from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';
import { HttpModule} from '@angular/http';
import {HTTP_PROVIDERS} from '@angular/http';
import {routing} from './app.routes';
import { App} from './app';
import {LocationStrategy, HashLocationStrategy} from '@angular/common';
import {HttpService} from '../service/http/httpService';
import {Button} from '../components/button';
import {Checkbox} from '../components/checkbox';
import {PipeSafe} from "../pipe/pipe-safe";
import {OrderBy} from "../pipe/orderby";
import {Number} from '../pipe/number';
@NgModule({
imports: [
BrowserModule,
FormsModule,
HttpModule,
routing
],
declarations: [
App,
PipeSafe,
OrderBy,
Number
],
providers: [
ngCore.provide(LocationStrategy, {useClass: HashLocationStrategy}),
ngCore.provide('TemplateComponents', { useValue: {
'button': Button,
'checkbox': Checkbox,
}}),
HttpService
],
bootstrap: [ App ],
schemas: [ CUSTOM_ELEMENTS_SCHEMA ]
})
export class AppModule { }