我正在尝试从 '@angular/upgrade/static' 导入 import { UpgradeComponent };使用 ngupgrade 在 angular2 中使用 angular1 指令,但我收到此错误。
代码:
import { Directive, ElementRef, Injector } from '@angular/core';
import { UpgradeComponent } from '@angular/upgrade/static';
@Directive({
selector: 'help'
})
export class HelpComponentA1Directive extends UpgradeComponent {
constructor(elementRef: ElementRef, injector: Injector) {
super('help', elementRef, injector);
}
}