简体   繁体   English

Angular 2 RC5到RC6升级问题

[英]Angular 2 RC5 to RC6 upgrade issues

We have a huge app with about 100 odd components. 我们有一个巨大的应用程序,其中包含约100个奇数组件。 I recently did an upgrade to RC5 with router RC1 from angular 2 RC4. 最近,我将路由器RC1从angular 2 RC4升级到RC5。 Now I want to upgrade it to RC6 before moving to final release since RC6 also has breaking changes. 现在,我想在升级到最终版本之前将其升级到RC6,因为RC6也有重大更改。 I made the necessary changes in package.json to move to RC6 and router rc.2. 我在package.json中进行了必要的更改,以移至RC6和路由器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. 删除了HTTP_PROVIDERS,JSONP_PROVIDERS,FORM_DIRECTIVES,FORM_PROVIDERS和CORE_DIRECTIVES。 Imported HttpModule, FormsModule, CommonModule and RouterModule in app.module. 在app.module中导入了HttpModule,FormsModule,CommonModule和RouterModule。 Also renamed DomSanitationService to DomSanitizer and Used ComponentFactoryResolver instead ComponentResolver. 还将DomSanitationService重命名为DomSanitizer,并使用ComponentFactoryResolver代替了ComponentResolver。

The issues I am facing now are: 我现在面临的问题是:

  1. DynamicComponentLoader is deprecated. 不建议使用DynamicComponentLoader。 In the app , we are using loadNexttoLocation(). 在应用程序中,我们正在使用loadNexttoLocation()。 What can I use in place of DynamicComponentLoader? 我可以代替DynamicComponentLoader使用什么?

  2. Error: Has no Exported Memeber ControlValueAccessor 错误:没有导出的Memeber ControlValueAccessor

  3. Cannot find name 'Contorl' 找不到名称“ Contorl”

DynamicComponentLoader is deprecated and should be replaced with ComponentFactory. 不建议使用DynamicComponentLoader,而应将其替换为ComponentFactory。

For reference, use these links- 作为参考,请使用这些链接-

Angular 2 dynamic tabs with user-click chosen components 带有用户单击所选组件的Angular 2动态选项卡

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

As Gunter mentioned above, there is no point in moving to RC6 now. 正如Gunter上文所述,现在转向RC6是没有意义的。 You can directly upgrade your application from RC5 to Final 2.0.0 and address these issues in one time. 您可以将应用程序从RC5直接升级到Final 2.0.0,并一次性解决这些问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM