Messed up entire app structure

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:

  1. If ‘ion-icon’ is an Angular component, then verify that it is part of this module.
  2. 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 {}

I had this problem with a page … .I changed .forChild to IonicModue.forRoot() … Not sure why it worked… but it worked.

Please edit your post, it is not very readable at the moment.
Use the </> button above the input field to format your code, command line output or error message (select the text first, then click the button or wrap it in ``` manually). Check the preview if it looks better. This will make sure your text is readable and if it recognizes the programming language it also automatically adds code syntax highlighting. Thanks.