0

We have a huge app with about 100 odd components. I recently did an upgrade to RC5 with router RC1 from angular 2 RC4. Now I want to upgrade it to RC6 before moving to final release since RC6 also has breaking changes. I made the necessary changes in package.json to move to RC6 and router rc.2. I faced some build errors which got resolved, such as removing directives, pipes and providers from all components. Removed HTTP_PROVIDERS, JSONP_PROVIDERS, FORM_DIRECTIVES, FORM_PROVIDERS and CORE_DIRECTIVES. Imported HttpModule, FormsModule, CommonModule and RouterModule in app.module. Also renamed DomSanitationService to DomSanitizer and Used ComponentFactoryResolver instead ComponentResolver.

The issues I am facing now are:

  1. DynamicComponentLoader is deprecated. In the app , we are using loadNexttoLocation(). What can I use in place of DynamicComponentLoader?

  2. Error: Has no Exported Memeber ControlValueAccessor

  3. Cannot find name 'Contorl'

user3344978
  • 644
  • 1
  • 8
  • 22
  • What's the point of moving to RC.6 first. There weren't many changes between RC.6 and final except bug fixes. – Günter Zöchbauer Oct 03 '16 at 14:51
  • Yes , I understand but there are breaking changes from RC5 to RC6 which need to be corrected in my app, which are needed for final – user3344978 Oct 03 '16 at 14:58
  • @GünterZöchbauer I tried upgrading directly to 2.0.0 but npm install is failing on typings install. I tried different versions but still fails – user3344978 Oct 03 '16 at 20:48

1 Answers1

0

DynamicComponentLoader is deprecated and should be replaced with ComponentFactory.

For reference, use these links-

Angular 2 dynamic tabs with user-click chosen components

https://stackoverflow.com/a/37044960/1679310

As Gunter mentioned above, there is no point in moving to RC6 now. You can directly upgrade your application from RC5 to Final 2.0.0 and address these issues in one time.

Community
  • 1
  • 1
Sanket
  • 19,295
  • 10
  • 71
  • 82
  • I upgraded directly to final 2.0.0. But I am not able to get past npm istall. Everytime I try, i get an ERR on typings. `"@angular/common": "2.0.0", "@angular/compiler": "2.0.0", "@angular/core": "2.0.0", "@angular/forms": "2.0.0", "@angular/http": "2.0.0", "@angular/platform-browser": "2.0.0", "@angular/platform-browser-dynamic": "2.0.0", "@angular/router": "3.0.0-rc.2", "@angular/upgrade": "2.0.0", "rxjs": "5.0.0-beta.12", "zone.js": "0.6.21", "typescript": "2.0.2", "typings": "1.0.4", ` – user3344978 Oct 03 '16 at 20:08
  • Verify all basic config files, node/npm version etc. Refer quick-start article on angular.io. If everything is in place then delete node_modules and re-install using npm again. – Sanket Oct 04 '16 at 03:19