title: sharing data between components and pages in ionic
body: <p>Hello I am learning ionic and I want to access components files into homepage, when I mention component class links in homepage only first page is displaying remaining pages are not coming into page. </p>
  
  <p>How to solve this or tell me any other way to achieve solve this problem?</p>
  
  <hr>
  
  <blockquote>
    <p>componentmodule.ts</p>
  </blockquote>
  
  <pre><code>import { NgModule } from '@angular/core';
  import { ImageComponent } from './image/image';
  import { IonicModule } from 'ionic-angular';
  import { VideoComponent } from './video/video';
  import { AudioComponent } from './audio/audio';
  import { TextComponent } from './text/text';
  
  @NgModule({
      declarations: [
          ImageComponent,
          VideoComponent,
          AudioComponent,
          TextComponent
      ],
      imports: [
          IonicModule
      ],
      exports: [
          ImageComponent,
          VideoComponent,
          AudioComponent,
          TextComponent
      ]
  })
  export class ComponentsModule { }
  </code></pre>
  
  <blockquote>
    <p>appmodule.ts</p>
  </blockquote>
  
  <pre><code>@NgModule({
    declarations: [
      MyApp,
      HomePage
    ],
    imports: [
      BrowserModule,
      ComponentsModule,
      IonicModule.forRoot(MyApp)
    ],
    bootstrap: [IonicApp],
    entryComponents: [
      MyApp,
      HomePage
    ],
    providers: [
      StatusBar,
      SplashScreen,
      {provide: ErrorHandler, useClass: IonicErrorHandler},
      ActionSheet 
  
    ]
  })
  </code></pre>
  
  <blockquote>
    <p>app.html</p>
  </blockquote>
  
  <pre><code>&lt;ion-header&gt;
    &lt;ion-navbar&gt;
      &lt;ion-title&gt;
        Ionic Blank
      &lt;/ion-title&gt;
    &lt;/ion-navbar&gt;
  &lt;/ion-header&gt;
  
  &lt;ion-content padding&gt;
  
    &lt;ion-card&gt;
      &lt;ion-card-header&gt;
        Image
      &lt;/ion-card-header&gt;
      &lt;ion-card-content&gt;
        &lt;image&gt;&lt;/image&gt;
      &lt;/ion-card-content&gt;
    &lt;/ion-card&gt;
  
  
    &lt;ion-card&gt;
      &lt;ion-card-header&gt;
        video
      &lt;/ion-card-header&gt;
      &lt;ion-card-content&gt;
        &lt;video&gt;&lt;/video&gt;
      &lt;/ion-card-content&gt;
    &lt;/ion-card&gt;
  
    &lt;ion-card&gt;
        &lt;ion-card-header&gt;
          Audio
        &lt;/ion-card-header&gt;
          &lt;ion-card-content&gt;
          &lt;audio&gt;&lt;/audio&gt;
        &lt;/ion-card-content&gt;
      &lt;/ion-card&gt;
  
  &lt;/ion-content&gt;
  </code></pre>