I am trying to upgrade my application from Angular14 to Angular19, and from Ionic6 to Ionic8. My app was working fine, but once upgraded, no ion component is recognizable.
I am getting errors of this type :
‘ion-label’ is not a known element:
1. If ‘ion-label’ is an Angular component, then verify that it is part of this module.
2. If ‘ion-label’ is a Web Component then add ‘CUSTOM_ELEMENTS_SCHEMA’ to the ‘@NgModule.schemas’ of this component to suppress this message.
This is my app.module.ts :
import {CUSTOM_ELEMENTS_SCHEMA, NgModule, NO_ERRORS_SCHEMA} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {PreloadAllModules, RouteReuseStrategy, RouterModule} from '@angular/router';
import {IonicModule, IonicRouteStrategy} from '@ionic/angular';
import {File} from '@awesome-cordova-plugins/file/ngx';
import {AppComponent} from './app.component';
import {AppRoutingModule} from './app-routing.module';
import {TranslateModule} from '@ngx-translate/core';
import {loginModules} from './login/login.modules';
import {HomePageModule} from './home/home.module';
import {HTTP_INTERCEPTORS, HttpClientModule} from '@angular/common/http';
import {HTTP} from "@awesome-cordova-plugins/http/ngx";
import Swiper from "swiper";
const componentParsers: Array<any> = [];
@NgModule({
declarations: [AppComponent, CategoriePipe, NoSanitizePipe,],
imports: [BrowserModule,
IonicModule.forRoot({
rippleEffect: true,
mode: 'md'
}),
provideDynamicHooks({ parsers: componentParsers}),
AppRoutingModule, HttpClientModule,
TranslateModule.forRoot({defaultLanguage: 'en'}),
loginModules,
HomePageModule],
providers: [{
provide: RouteReuseStrategy,
useClass: IonicRouteStrategy,
}, File, Device, SQLite, HTTP, AppVersion,
{
provide: HTTP_INTERCEPTORS,
useClass: LoaderInterceptor,
multi: true
}, DatePipe, CurrencyPipe, ScreenOrientation, DecimalPipe, NoSanitizePipe,
//{
// provide: "", useValue: ""
//}
],
bootstrap: [AppComponent],
exports: [loginModules, NoSanitizePipe],
schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA]
}
)
export class AppModule {
}
Has anyone encountered the same error ?