简体   繁体   中英

Upgradation of Nebular Theme(4.4.0 to 9.0.1) wrt Angular (8.2.3 to 13.2.1)

While Upgradation of Nebular Theme(4.4.0 to 9.0.1) wrt Angular (8.2.3 to 13.2.1) I am facing following issues:

  1. 'nb-card-header' is not a known element:
  • If 'nb-card-header' is an Angular component, then verify that it is part of this module.
  • If 'nb-card-header' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
  1. No directive found with exportAs 'ngModel'.
[(ngModel)]="startupWizard.company.state" #state="ngModel">
  1. Can't bind to 'ngModel' since it isn't a known property of 'input'.
[(ngModel)]="startupWizard.company.state" #state="ngModel">

I would like to know the best possible option to upgrade Nebular to Angular version 13?.

Does latest version of Nebular 9.1 support angular 13?.If yes, how can we migrate the old components to the latest one

I've recently managed to migrate to Angular 13 and Nebular 9, so it is possible (thought I needed to replace or delete some dependencies, but ngx-admin is working as intended).

I've used this site to properly migrate to Angular 13.

So, to the questions:

  1. 'nb-card-header' is not a known element

This error appears because something that is using nb-card-header can't find it in the used modules. To fix this issue, you need to add NbCardModule to the imports array of your Module in the .module.ts file (the module that uses the template that tries to use nb-card-header ).

Speaking of the last two issues, the may be related. For the second issue try finding other questions that mention No directive found with exportAs 'ngModel'. , for example, this one . Or probably in the documentation about ngModel . You can also try adding FormsModule to the imports of your Module.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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