title: Error: Unexpected directive 'DashboardPage' imported by the module 'SharedModule'. Please add a @NgModule annotation
body: <p>I am trying to use DashboardPage in app.module.ts file as shared module, In that I am facing error like "Error: Unexpected directive 'DashboardPage' imported by the module 'SharedModule'. Please add a @NgModule annotation."</p>
  
  <p>Give some suggestions to resolve this issue. Thanks in advance. </p>
  
  <p>Below the codes,</p>
  
  <p>app.module.ts</p>
  
  <pre><code>import {NgModule, ErrorHandler} from '@angular/core';
  import {BrowserModule} from '@angular/platform-browser';
  import {HttpModule} from '@angular/http';
  import {IonicApp, IonicModule, IonicErrorHandler, IonicPageModule} from 'ionic-angular';
  import {MyApp} from './app.component';
  import {DatePickerModule} from 'datepicker-ionic2';
  import {IonicStorageModule} from '@ionic/storage';
  import {PreloadImageModule} from '../components/preload-image/preload-image.module';
  import {ShowHidePasswordModule} from "../components/show-hide-password/show-hide-password.module";
  import {Login} from '../pages/login/login';
  import {DashboardPage} from '../pages/dashboard/dashboard';
  import {SharedModule} from '../app/shared/shared-module';
  import {PROVIDERS} from '../app/shared/dashboard';
  @NgModule({
      declarations: [
          MyApp,
          Login,
      ],
      imports: [
          BrowserModule,
          HttpModule,
          IonicModule.forRoot(MyApp, {
              platforms: {
                  ios: {
                      autoFocusAssist: 'instant'
                  }
              }
          }),
          IonicStorageModule.forRoot(),
          DatePickerModule,
          SharedModule,
          IonicPageModule.forChild(Login), PreloadImageModule, ShowHidePasswordModule,
      ],
      bootstrap: [IonicApp],
      entryComponents: [
          MyApp,
          Login,
      ],
      providers: [
          PROVIDERS,
          {provide: ErrorHandler, useClass: IonicErrorHandler},
      ]
  })
  export class AppModule {
  }
  </code></pre>
  
  <p>shared-module.ts file</p>
  
  <pre><code>import {NgModule} from '@angular/core';
  import {CommonModule} from "@angular/common";
  import {PROVIDERS} from "../shared/dashboard";
  import {DashboardPage} from "../../pages/dashboard/dashboard";
  
  @NgModule({
      declarations: [
          PROVIDERS
      ],
      imports: [
          CommonModule,
          DashboardPage,
      ],
      exports: [
          DashboardPage,
      ]
  })
  
  export class SharedModule {
  }
  </code></pre>