mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 21:48:42 +08:00
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -614,7 +614,7 @@ export class Menu extends Ion {
|
||||
* @private
|
||||
*/
|
||||
getBackdropElement(): HTMLElement {
|
||||
return this.backdrop.elementRef.nativeElement;
|
||||
return this.backdrop.getNativeElement();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user