你可以使用 ChangeDetectorRef 令牌来将 viewRef 注入到组件的构造函数中:. export class AppComponent { constructor(cd: ChangeDetectorRef) { ... } 从其定义可以看出 ...
確定! 回上一頁