Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 230059

Error: Type PdfViewerComponent is part of the declarations of 2 modules

$
0
0

here’s my app.module.ts

import { NgModule , ErrorHandler } from ‘@angular/core’;
import { IonicApp, IonicModule , IonicErrorHandler } from ‘ionic-angular’;
import { PdfViewerComponent } from ‘ng2-pdf-viewer’;
import { APP_CONFIG, AppConfig } from ‘./app.config’;
import { IonAlphaScrollModule } from ‘ionic2-alpha-scroll’;
import { BrowserModule } from ‘@angular/platform-browser’;
import { HttpModule } from ‘@angular/http’;
import { IonicStorageModule } from ‘@ionic/storage’;
import { DynamicComponentModule } from ‘ng-dynamic’;
import { FormsModule } from ‘@angular/forms’;
import { PipesModule } from ‘…/pipes/pipes.module’;
import { SplashScreen } from ‘@ionic-native/splash-screen’;

import { MyApp } from ‘./app.component’;

@NgModule({
declarations: [
MyApp
],
imports: [
BrowserModule,
HttpModule,
IonicModule.forRoot(MyApp),
IonAlphaScrollModule,
DynamicComponentModule,
FormsModule,
IonicStorageModule.forRoot(),
PipesModule
],
bootstrap: [IonicApp],
entryComponents: [
MyApp
],
providers: [{provide: ErrorHandler, useClass: IonicErrorHandler}, { provide: APP_CONFIG, useValue: AppConfig },SplashScreen]
})
export class AppModule {}

first page Copiefacture.module.ts

import { NgModule } from ‘@angular/core’;
import { IonicPageModule } from ‘ionic-angular’;
import { Copiefacture } from ‘./copie-facture’;
import { PdfViewerComponent } from ‘ng2-pdf-viewer’;

@NgModule({
declarations: [
Copiefacture,
PdfViewerComponent
],
imports: [
IonicPageModule.forChild(Copiefacture)
],

})
export class CopiefactureModule {}

second page doc-utils-view.module.ts

import { NgModule } from ‘@angular/core’;
import { IonicPageModule } from ‘ionic-angular’;
import { DocUtilsView } from ‘./doc-utils-view’;
import { PdfViewerComponent } from ‘ng2-pdf-viewer’;

@NgModule({
declarations: [
DocUtilsView,
PdfViewerComponent
],
imports: [
IonicPageModule.forChild(DocUtilsView)
],
})
export class DocUtilsViewModule {}


Viewing all articles
Browse latest Browse all 230059

Trending Articles