i was happily using ionic cordova build browser and deploying my app. and then i started to used it with --prod option.
As soon as i did it my project started to fail saying i have same component imported in app.module.ts as well as components.module.ts
i removed the app.module.ts entries and now i am stuck with more weird issues. Currently the error comes:
Error: Template parse errors:
Error: Template parse errors:
‘ion-icon’ is not a known element:
- If ‘ion-icon’ is an Angular component, then verify that it is part of this module.
- If ‘ion-icon’ is a Web Component then add ‘CUSTOM_ELEMENTS_SCHEMA’ to the ‘@NgModule.schemas’ of this component to suppress this message. (“row style=“padding-left:70px” justify-content-top align-items-start>
[ERROR ->]
<ion-col *ngIf=”"): ng:///Users/vskumar/Dropbox/OscIbcsBotsGit/angular2/nba/src/components/header-nav/header-nav.html@3:6
’ion-col’ is not a known element:
Overall strcuture:
a page named opportunity
which is including a custom component called header-nav.
relevant code:
opportunities.ts
import { HeaderNavComponent } from ‘…/…/components/header-nav/header-nav’
@IonicPage()
@Component({
selector: ‘page-opportunities’,
templateUrl: ‘opportunities.html’,
})
export class OpportunitiesPage {
data:any;
selectedTheme:string;
…
}
opportunities.module.ts
import { NgModule } from ‘@angular/core’;
import { IonicPageModule } from ‘ionic-angular’;
import { OpportunitiesPage } from ‘./opportunities’;
import { HeaderNavComponent } from ‘…/…/components/header-nav/header-nav’;
@NgModule({
declarations: [
OpportunitiesPage,
],
imports: [
IonicPageModule.forChild(OpportunitiesPage)
],
})
export class OpportunitiesPageModule {}
components.module.ts
import { NgModule } from ‘@angular/core’;
import { IonicApp, IonicErrorHandler, IonicModule } from ‘ionic-angular’;
import { HeaderNavComponent } from ‘./header-nav/header-nav’;
@NgModule({
declarations: [
HeaderNavComponent],
imports: [
],
exports: [
HeaderNavComponent]
})
export class ComponentsModule {}