Reputation: 29
I am fairly new to Angular and typescript but I have an Angular 6 project using Ionic 3 elements.
I am trying to import a library that is saved locally from the cdn from path ../lib/ionic.bundle.js
into my project but I get template parse errors which indicates the module is not imported for that path.
Error: Template parse errors:
'ion-card-header' is not a known element:
1. If 'ion-card-header' is an Angular component, then verify that it is part of this module.
2. If 'ion-card-header' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("
<ion-card>
import { IonicApp, IonicModule } from '../lib/ionic.bundle.js';
const routes: Routes = [
{
path: 'create',
component: CreateComponent
},
{
path: 'edit/:id',
component: EditComponent
},
{
path: 'index',
component: IndexComponent
}
];
@NgModule({
declarations: [
CreateComponent,
IndexComponent,
EditComponent,
],
imports: [
IonicModule.forRoot(routes)
],
providers: [ ...]
})
export class AppModule { }
I am sure the file exists at that path but not being imported from some reason.
Is there a different way of importing the IonicModule
?
Upvotes: 0
Views: 1022