mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 04:14:21 +08:00
refactor: improve tree shaking abilities
Internal refactor completed in order to improve tree shaking and dead code removal. The public API, with an exception to ion-slides, has stayed the same. However, internally many changes were required so bundlers could better exclude modules which should not be bundled. Ultimately most changes resorted to removing references to `window` or `document`, or a module that referenced one of those. BREAKING CHANGES ion-slides was refactored to remove the external dependencies, and rewritten in TypeScript/ES6 modules to again improve tree shaking abilities.
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import { ComponentRef, ElementRef, EventEmitter, Output, Renderer } from '@angular/core';
|
||||
|
||||
import { Footer, Header } from '../components/toolbar/toolbar';
|
||||
import { isPresent, assign } from '../util/util';
|
||||
import { isPresent } from '../util/util';
|
||||
import { Navbar } from '../components/navbar/navbar';
|
||||
import { NavController } from './nav-controller';
|
||||
import { NavOptions, ViewState } from './nav-util';
|
||||
@ -79,6 +79,16 @@ export class ViewController {
|
||||
*/
|
||||
willUnload: EventEmitter<any> = new EventEmitter();
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
readReady: EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
writeReady: EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
/** @private */
|
||||
data: any;
|
||||
|
||||
@ -160,7 +170,7 @@ export class ViewController {
|
||||
this._dismissData = data;
|
||||
this._dismissRole = role;
|
||||
|
||||
const options = assign({}, this._leavingOpts, navOptions);
|
||||
const options = Object.assign({}, this._leavingOpts, navOptions);
|
||||
return this._nav.removeView(this, options).then(() => data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user