[英]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.