【发布时间】:2020-01-31 12:49:43
【问题描述】:
我不断收到此错误
Uncaught ReferenceError: CoreControls is not defined
import {AfterViewInit, Component, ElementRef, OnInit, ViewChild} from '@angular/core';
import DocumnetViewer = CoreControls.DocumentViewer;
declare const WebViewer: any;
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit, AfterViewInit {
@ViewChild('viewer') viewer: ElementRef;
wvInstance: any;
ngAfterViewInit(): void {
/* some code */
const documentViewer = new DocumnetViewer();
documentViewer.displayPageLocation(3, 1, 3, true);
/* some code */
}
}
在第 2 行出现错误。请帮我解决这个问题。提前致谢。
【问题讨论】:
标签: typescript pdftron