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:
Kristiyan Kostadinov
2016-11-22 18:53:23 +01:00
committed by Andrew Seguin
parent fc30d4cfce
commit 87807200f7
2 changed files with 4 additions and 5 deletions
+3
View File
@@ -0,0 +1,3 @@
<div tabindex="0" (focus)="focusLastTabbableElement()"></div>
<div #trappedContent><ng-content></ng-content></div>
<div tabindex="0" (focus)="focusFirstTabbableElement()"></div>
+1 -5
View File
@@ -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 {