fix(menu): getBackdropElement

references #7125
This commit is contained in:
Manu Mtz.-Almeida
2016-07-02 17:30:37 +02:00
parent 01c7c1ada7
commit cac1d4f961
2 changed files with 7 additions and 3 deletions

View File

@ -1,4 +1,4 @@
import { Directive, Input } from '@angular/core';
import { Directive, ElementRef, Input } from '@angular/core';
import { AppRoot } from '../app/app';
import { isTrueProperty } from '../../util/util';
@ -39,7 +39,7 @@ export class Backdrop {
private pushed: boolean = false;
@Input() disableScroll = true;
constructor(private _appRoot: AppRoot) {}
constructor(private _appRoot: AppRoot, private _elementRef: ElementRef) {}
ngOnInit() {
if (isTrueProperty(this.disableScroll)) {
@ -55,4 +55,8 @@ export class Backdrop {
}
}
getNativeElement(): HTMLElement {
return this._elementRef.nativeElement;
}
}