本文整理汇总了TypeScript中@angular/cdk/a11y.FocusMonitor类的典型用法代码示例。如果您正苦于以下问题:TypeScript FocusMonitor类的具体用法?TypeScript FocusMonitor怎么用?TypeScript FocusMonitor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FocusMonitor类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: constructor
constructor(
public _intl: MatStepperIntl,
private _focusMonitor: FocusMonitor,
private _element: ElementRef<HTMLElement>,
changeDetectorRef: ChangeDetectorRef) {
_focusMonitor.monitor(_element.nativeElement, true);
this._intlSubscription = _intl.changes.subscribe(() => changeDetectorRef.markForCheck());
}
示例2: constructor
constructor(private _focusMonitor: FocusMonitor, private _element: ElementRef) {
_focusMonitor.monitor(_element.nativeElement, true);
}
示例3: constructor
constructor(
private _focusMonitor: FocusMonitor,
private _element: ElementRef,
renderer: Renderer2) {
_focusMonitor.monitor(_element.nativeElement, renderer, true);
}
示例4: ngOnDestroy
ngOnDestroy() {
this._intlSubscription.unsubscribe();
this._focusMonitor.stopMonitoring(this._elementRef);
}
示例5: ngOnDestroy
ngOnDestroy() {
this._focusMonitor.stopMonitoring(this._element.nativeElement);
}
示例6: focus
/** Focuses the step header. */
focus() {
this._focusMonitor.focusVia(this._elementRef, 'program');
}