|
1 | | -import { AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, EventEmitter, HostListener, Input, NgZone, OnDestroy, Optional, Output, Renderer, ViewChild, ViewEncapsulation } from '@angular/core'; |
| 1 | +import { AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, EventEmitter, Input, NgZone, OnDestroy, Optional, Output, Renderer, ViewChild, ViewEncapsulation } from '@angular/core'; |
2 | 2 |
|
3 | 3 | import { App } from '../app/app'; |
4 | 4 | import { Config } from '../../config/config'; |
@@ -227,6 +227,8 @@ export class Content extends Ion implements OnDestroy, AfterViewInit, IContent { |
227 | 227 | /** @internal */ |
228 | 228 | _scrollDownOnLoad: boolean = false; |
229 | 229 |
|
| 230 | + _viewCtrl: any; |
| 231 | + |
230 | 232 | private _imgReqBfr: number; |
231 | 233 | private _imgRndBfr: number; |
232 | 234 | private _imgVelMax: number; |
@@ -410,6 +412,8 @@ export class Content extends Ion implements OnDestroy, AfterViewInit, IContent { |
410 | 412 | } |
411 | 413 |
|
412 | 414 | if (viewCtrl) { |
| 415 | + this._viewCtrl = viewCtrl; |
| 416 | + |
413 | 417 | // content has a view controller |
414 | 418 | viewCtrl._setIONContent(this); |
415 | 419 | viewCtrl._setIONContentRef(elementRef); |
@@ -670,7 +674,6 @@ export class Content extends Ion implements OnDestroy, AfterViewInit, IContent { |
670 | 674 | * Tell the content to recalculate its dimensions. This should be called |
671 | 675 | * after dynamically adding/removing headers, footers, or tabs. |
672 | 676 | */ |
673 | | - @HostListener('window:orientationchange') |
674 | 677 | resize() { |
675 | 678 | this._dom.read(this._readDimensions.bind(this)); |
676 | 679 | this._dom.write(this._writeDimensions.bind(this)); |
|
0 commit comments