mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
chore(focus-trap): move template to a separate file (#1772)
Moves the focus trap to a separate file, as per a TODO.
This commit is contained in:
committed by
Andrew Seguin
parent
fc30d4cfce
commit
87807200f7
@@ -0,0 +1,3 @@
|
||||
<div tabindex="0" (focus)="focusLastTabbableElement()"></div>
|
||||
<div #trappedContent><ng-content></ng-content></div>
|
||||
<div tabindex="0" (focus)="focusFirstTabbableElement()"></div>
|
||||
@@ -13,11 +13,7 @@ import {InteractivityChecker} from './interactivity-checker';
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'focus-trap',
|
||||
// TODO(jelbourn): move this to a separate file.
|
||||
template: `
|
||||
<div tabindex="0" (focus)="focusLastTabbableElement()"></div>
|
||||
<div #trappedContent><ng-content></ng-content></div>
|
||||
<div tabindex="0" (focus)="focusFirstTabbableElement()"></div>`,
|
||||
templateUrl: 'focus-trap.html',
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
})
|
||||
export class FocusTrap {
|
||||
|
||||
Reference in New Issue
Block a user