本文整理匯總了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');
}