简体   繁体   English

模块“ AppModule”导入的意外值“ PdfmakeModule”

[英]Unexpected value 'PdfmakeModule' imported by the module 'AppModule'

I am trying to use ng-pdf-make in my angular application. 我正在尝试在我的角度应用程序中使用ng-pdf-make Below is my app.module.ts file 以下是我的app.module.ts文件

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { PdfmakeModule } from 'ng-pdf-make';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    PdfmakeModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

As soon as i import the ng-pdf-make into my module am getting below error in the console 一旦我将ng-pdf-make导入模块,控制台中的错误就会降低

Uncaught Error: Unexpected value 'PdfmakeModule' imported by the module 'AppModule'. Please add a @NgModule annotation.

ng-pdf-make version 0.0.2 ng-pdf-make版本0.0.2

Don't include full module, just add only service PdfmakeService to providers and add 不包括完整的模块,只需将服务PdfmakeService添加到提供程序并添加

import {PdfmakeService} from 'ng-pdf-make/pdfmake/pdfmake.service'; 从'ng-pdf-make / pdfmake / pdfmake.service'导入{PdfmakeService};

to component. 组成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 模块“AppModule”在语法错误处导入的意外值“未定义” - Unexpected value 'undefined' imported by the module 'AppModule' at syntaxError 模块“ AppModule”导入的异常值“ MdlModule” - Unexpected value 'MdlModule' imported by the module 'AppModule' 模块'AppModule'导入的意外值'ImageUploadModule' - Unexpected value 'ImageUploadModule' imported by the module 'AppModule' Angular - 模块AppModule导入的意外值MatDialog - Angular - Unexpected value MatDialog imported by the module AppModule 模块'AppModule'导入的意外值'MyCustomModule' - Unexpected value 'MyCustomModule' imported by the module 'AppModule' 模块“ AppModule”导入的异常值“ BootstrapModalModule” - Unexpected value 'BootstrapModalModule' imported by the module 'AppModule' 模块“ AppModule”导入的异常值“ QRCodeModule” - Unexpected value 'QRCodeModule' imported by the module 'AppModule' 模块'AppModule'导入的意外值'[object Object]' - Unexpected value '[object Object]' imported by the module 'AppModule' 错误:意外的值“AngularFireAuth”。 由模块“AppModule”导入 - Error: Unexpected value 'AngularFireAuth'. imported by the module 'AppModule' 模块“AppModule”导入的意外值“AngularFirestore” - Unexpected value 'AngularFirestore' imported by the module 'AppModule'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM