Progress: {{progress}}%
\n *= 100\">Done processing {{label}} of Angular zone!
\n *\n * \n * \n * `,\n * })\n * export class NgZoneDemo {\n * progress: number = 0;\n * label: string;\n *\n * constructor(private _ngZone: NgZone) {}\n *\n * // Loop inside the Angular zone\n * // so the UI DOES refresh after each setTimeout cycle\n * processWithinAngularZone() {\n * this.label = 'inside';\n * this.progress = 0;\n * this._increaseProgress(() => console.log('Inside Done!'));\n * }\n *\n * // Loop outside of the Angular zone\n * // so the UI DOES NOT refresh after each setTimeout cycle\n * processOutsideOfAngularZone() {\n * this.label = 'outside';\n * this.progress = 0;\n * this._ngZone.runOutsideAngular(() => {\n * this._increaseProgress(() => {\n * // reenter the Angular zone and display done\n * this._ngZone.run(() => {console.log('Outside Done!') });\n * }}));\n * }\n *\n * _increaseProgress(doneCallback: () => void) {\n * this.progress += 1;\n * console.log(`Current progress: ${this.progress}%`);\n *\n * if (this.progress < 100) {\n * window.setTimeout(() => this._increaseProgress(doneCallback)), 10)\n * } else {\n * doneCallback();\n * }\n * }\n * }\n * ```\n *\n * \\@experimental\n */\nvar NgZone = (function () {\n /**\n * @param {?} __0\n */\n function NgZone(_a) {\n var _b = _a.enableLongStackTrace, enableLongStackTrace = _b === void 0 ? false : _b;\n this._hasPendingMicrotasks = false;\n this._hasPendingMacrotasks = false;\n this._isStable = true;\n this._nesting = 0;\n this._onUnstable = new EventEmitter(false);\n this._onMicrotaskEmpty = new EventEmitter(false);\n this._onStable = new EventEmitter(false);\n this._onErrorEvents = new EventEmitter(false);\n if (typeof Zone == 'undefined') {\n throw new Error('Angular requires Zone.js prolyfill.');\n }\n Zone.assertZonePatched();\n this.outer = this.inner = Zone.current;\n if (Zone['wtfZoneSpec']) {\n this.inner = this.inner.fork(Zone['wtfZoneSpec']);\n }\n if (enableLongStackTrace && Zone['longStackTraceZoneSpec']) {\n this.inner = this.inner.fork(Zone['longStackTraceZoneSpec']);\n }\n this.forkInnerZoneWithAngularBehavior();\n }\n /**\n * @return {?}\n */\n NgZone.isInAngularZone = function () { return Zone.current.get('isAngularZone') === true; };\n /**\n * @return {?}\n */\n NgZone.assertInAngularZone = function () {\n if (!NgZone.isInAngularZone()) {\n throw new Error('Expected to be in Angular Zone, but it is not!');\n }\n };\n /**\n * @return {?}\n */\n NgZone.assertNotInAngularZone = function () {\n if (NgZone.isInAngularZone()) {\n throw new Error('Expected to not be in Angular Zone, but it is!');\n }\n };\n /**\n * Executes the `fn` function synchronously within the Angular zone and returns value returned by\n * the function.\n *\n * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n * outside of the Angular zone (typically started via {\\@link #runOutsideAngular}).\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * within the Angular zone.\n *\n * If a synchronous error happens it will be rethrown and not reported via `onError`.\n * @param {?} fn\n * @return {?}\n */\n NgZone.prototype.run = function (fn) { return this.inner.run(fn); };\n /**\n * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not\n * rethrown.\n * @param {?} fn\n * @return {?}\n */\n NgZone.prototype.runGuarded = function (fn) { return this.inner.runGuarded(fn); };\n /**\n * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by\n * the function.\n *\n * Running functions via {\\@link #runOutsideAngular} allows you to escape Angular's zone and do\n * work that\n * doesn't trigger Angular change-detection or is subject to Angular's error handling.\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * outside of the Angular zone.\n *\n * Use {\\@link #run} to reenter the Angular zone and do work that updates the application model.\n * @param {?} fn\n * @return {?}\n */\n NgZone.prototype.runOutsideAngular = function (fn) { return this.outer.run(fn); };\n Object.defineProperty(NgZone.prototype, \"onUnstable\", {\n /**\n * Notifies when code enters Angular Zone. This gets fired first on VM Turn.\n * @return {?}\n */\n get: function () { return this._onUnstable; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgZone.prototype, \"onMicrotaskEmpty\", {\n /**\n * Notifies when there is no more microtasks enqueue in the current VM Turn.\n * This is a hint for Angular to do change detection, which may enqueue more microtasks.\n * For this reason this event can fire multiple times per VM Turn.\n * @return {?}\n */\n get: function () { return this._onMicrotaskEmpty; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgZone.prototype, \"onStable\", {\n /**\n * Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which\n * implies we are about to relinquish VM turn.\n * This event gets called just once.\n * @return {?}\n */\n get: function () { return this._onStable; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgZone.prototype, \"onError\", {\n /**\n * Notify that an error has been delivered.\n * @return {?}\n */\n get: function () { return this._onErrorEvents; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgZone.prototype, \"isStable\", {\n /**\n * Whether there are no outstanding microtasks or macrotasks.\n * @return {?}\n */\n get: function () { return this._isStable; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgZone.prototype, \"hasPendingMicrotasks\", {\n /**\n * @return {?}\n */\n get: function () { return this._hasPendingMicrotasks; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgZone.prototype, \"hasPendingMacrotasks\", {\n /**\n * @return {?}\n */\n get: function () { return this._hasPendingMacrotasks; },\n enumerable: true,\n configurable: true\n });\n /**\n * @return {?}\n */\n NgZone.prototype.checkStable = function () {\n var _this = this;\n if (this._nesting == 0 && !this._hasPendingMicrotasks && !this._isStable) {\n try {\n this._nesting++;\n this._onMicrotaskEmpty.emit(null);\n }\n finally {\n this._nesting--;\n if (!this._hasPendingMicrotasks) {\n try {\n this.runOutsideAngular(function () { return _this._onStable.emit(null); });\n }\n finally {\n this._isStable = true;\n }\n }\n }\n }\n };\n /**\n * @return {?}\n */\n NgZone.prototype.forkInnerZoneWithAngularBehavior = function () {\n var _this = this;\n this.inner = this.inner.fork({\n name: 'angular',\n properties: /** @type {?} */ ({ 'isAngularZone': true }),\n onInvokeTask: function (delegate, current, target, task, applyThis, applyArgs) {\n try {\n _this.onEnter();\n return delegate.invokeTask(target, task, applyThis, applyArgs);\n }\n finally {\n _this.onLeave();\n }\n },\n onInvoke: function (delegate, current, target, callback, applyThis, applyArgs, source) {\n try {\n _this.onEnter();\n return delegate.invoke(target, callback, applyThis, applyArgs, source);\n }\n finally {\n _this.onLeave();\n }\n },\n onHasTask: function (delegate, current, target, hasTaskState) {\n delegate.hasTask(target, hasTaskState);\n if (current === target) {\n // We are only interested in hasTask events which originate from our zone\n // (A child hasTask event is not interesting to us)\n if (hasTaskState.change == 'microTask') {\n _this.setHasMicrotask(hasTaskState.microTask);\n }\n else if (hasTaskState.change == 'macroTask') {\n _this.setHasMacrotask(hasTaskState.macroTask);\n }\n }\n },\n onHandleError: function (delegate, current, target, error) {\n delegate.handleError(target, error);\n _this.triggerError(error);\n return false;\n }\n });\n };\n /**\n * @return {?}\n */\n NgZone.prototype.onEnter = function () {\n this._nesting++;\n if (this._isStable) {\n this._isStable = false;\n this._onUnstable.emit(null);\n }\n };\n /**\n * @return {?}\n */\n NgZone.prototype.onLeave = function () {\n this._nesting--;\n this.checkStable();\n };\n /**\n * @param {?} hasMicrotasks\n * @return {?}\n */\n NgZone.prototype.setHasMicrotask = function (hasMicrotasks) {\n this._hasPendingMicrotasks = hasMicrotasks;\n this.checkStable();\n };\n /**\n * @param {?} hasMacrotasks\n * @return {?}\n */\n NgZone.prototype.setHasMacrotask = function (hasMacrotasks) { this._hasPendingMacrotasks = hasMacrotasks; };\n /**\n * @param {?} error\n * @return {?}\n */\n NgZone.prototype.triggerError = function (error) { this._onErrorEvents.emit(error); };\n return NgZone;\n}());\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The Testability service provides testing hooks that can be accessed from\n * the browser and by services such as Protractor. Each bootstrapped Angular\n * application on the page will have an instance of Testability.\n * \\@experimental\n */\nvar Testability = (function () {\n /**\n * @param {?} _ngZone\n */\n function Testability(_ngZone) {\n this._ngZone = _ngZone;\n /**\n * \\@internal\n */\n this._pendingCount = 0;\n /**\n * \\@internal\n */\n this._isZoneStable = true;\n /**\n * Whether any work was done since the last 'whenStable' callback. This is\n * useful to detect if this could have potentially destabilized another\n * component while it is stabilizing.\n * \\@internal\n */\n this._didWork = false;\n /**\n * \\@internal\n */\n this._callbacks = [];\n this._watchAngularEvents();\n }\n /**\n * \\@internal\n * @return {?}\n */\n Testability.prototype._watchAngularEvents = function () {\n var _this = this;\n this._ngZone.onUnstable.subscribe({\n next: function () {\n _this._didWork = true;\n _this._isZoneStable = false;\n }\n });\n this._ngZone.runOutsideAngular(function () {\n _this._ngZone.onStable.subscribe({\n next: function () {\n NgZone.assertNotInAngularZone();\n scheduleMicroTask(function () {\n _this._isZoneStable = true;\n _this._runCallbacksIfReady();\n });\n }\n });\n });\n };\n /**\n * @return {?}\n */\n Testability.prototype.increasePendingRequestCount = function () {\n this._pendingCount += 1;\n this._didWork = true;\n return this._pendingCount;\n };\n /**\n * @return {?}\n */\n Testability.prototype.decreasePendingRequestCount = function () {\n this._pendingCount -= 1;\n if (this._pendingCount < 0) {\n throw new Error('pending async requests below zero');\n }\n this._runCallbacksIfReady();\n return this._pendingCount;\n };\n /**\n * @return {?}\n */\n Testability.prototype.isStable = function () {\n return this._isZoneStable && this._pendingCount == 0 && !this._ngZone.hasPendingMacrotasks;\n };\n /**\n * \\@internal\n * @return {?}\n */\n Testability.prototype._runCallbacksIfReady = function () {\n var _this = this;\n if (this.isStable()) {\n // Schedules the call backs in a new frame so that it is always async.\n scheduleMicroTask(function () {\n while (_this._callbacks.length !== 0) {\n (((_this._callbacks.pop())))(_this._didWork);\n }\n _this._didWork = false;\n });\n }\n else {\n // Not Ready\n this._didWork = true;\n }\n };\n /**\n * @param {?} callback\n * @return {?}\n */\n Testability.prototype.whenStable = function (callback) {\n this._callbacks.push(callback);\n this._runCallbacksIfReady();\n };\n /**\n * @return {?}\n */\n Testability.prototype.getPendingRequestCount = function () { return this._pendingCount; };\n /**\n * @deprecated use findProviders\n * @param {?} using\n * @param {?} provider\n * @param {?} exactMatch\n * @return {?}\n */\n Testability.prototype.findBindings = function (using, provider, exactMatch) {\n // TODO(juliemr): implement.\n return [];\n };\n /**\n * @param {?} using\n * @param {?} provider\n * @param {?} exactMatch\n * @return {?}\n */\n Testability.prototype.findProviders = function (using, provider, exactMatch) {\n // TODO(juliemr): implement.\n return [];\n };\n return Testability;\n}());\nTestability.decorators = [\n { type: Injectable },\n];\n/**\n * @nocollapse\n */\nTestability.ctorParameters = function () { return [\n { type: NgZone, },\n]; };\n/**\n * A global registry of {\\@link Testability} instances for specific elements.\n * \\@experimental\n */\nvar TestabilityRegistry = (function () {\n function TestabilityRegistry() {\n /**\n * \\@internal\n */\n this._applications = new Map();\n _testabilityGetter.addToWindow(this);\n }\n /**\n * @param {?} token\n * @param {?} testability\n * @return {?}\n */\n TestabilityRegistry.prototype.registerApplication = function (token, testability) {\n this._applications.set(token, testability);\n };\n /**\n * @param {?} elem\n * @return {?}\n */\n TestabilityRegistry.prototype.getTestability = function (elem) { return this._applications.get(elem) || null; };\n /**\n * @return {?}\n */\n TestabilityRegistry.prototype.getAllTestabilities = function () { return Array.from(this._applications.values()); };\n /**\n * @return {?}\n */\n TestabilityRegistry.prototype.getAllRootElements = function () { return Array.from(this._applications.keys()); };\n /**\n * @param {?} elem\n * @param {?=} findInAncestors\n * @return {?}\n */\n TestabilityRegistry.prototype.findTestabilityInTree = function (elem, findInAncestors) {\n if (findInAncestors === void 0) { findInAncestors = true; }\n return _testabilityGetter.findTestabilityInTree(this, elem, findInAncestors);\n };\n return TestabilityRegistry;\n}());\nTestabilityRegistry.decorators = [\n { type: Injectable },\n];\n/**\n * @nocollapse\n */\nTestabilityRegistry.ctorParameters = function () { return []; };\nvar _NoopGetTestability = (function () {\n function _NoopGetTestability() {\n }\n /**\n * @param {?} registry\n * @return {?}\n */\n _NoopGetTestability.prototype.addToWindow = function (registry) { };\n /**\n * @param {?} registry\n * @param {?} elem\n * @param {?} findInAncestors\n * @return {?}\n */\n _NoopGetTestability.prototype.findTestabilityInTree = function (registry, elem, findInAncestors) {\n return null;\n };\n return _NoopGetTestability;\n}());\n/**\n * Set the {\\@link GetTestability} implementation used by the Angular testing framework.\n * \\@experimental\n * @param {?} getter\n * @return {?}\n */\nfunction setTestabilityGetter(getter) {\n _testabilityGetter = getter;\n}\nvar _testabilityGetter = new _NoopGetTestability();\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar _devMode = true;\nvar _runModeLocked = false;\nvar _platform;\nvar ALLOW_MULTIPLE_PLATFORMS = new InjectionToken('AllowMultipleToken');\n/**\n * Disable Angular's development mode, which turns off assertions and other\n * checks within the framework.\n *\n * One important assertion this disables verifies that a change detection pass\n * does not result in additional changes to any bindings (also known as\n * unidirectional data flow).\n *\n * \\@stable\n * @return {?}\n */\nfunction enableProdMode() {\n if (_runModeLocked) {\n throw new Error('Cannot enable prod mode after platform setup.');\n }\n _devMode = false;\n}\n/**\n * Returns whether Angular is in development mode. After called once,\n * the value is locked and won't change any more.\n *\n * By default, this is true, unless a user calls `enableProdMode` before calling this.\n *\n * \\@experimental APIs related to application bootstrap are currently under review.\n * @return {?}\n */\nfunction isDevMode() {\n _runModeLocked = true;\n return _devMode;\n}\n/**\n * A token for third-party components that can register themselves with NgProbe.\n *\n * \\@experimental\n */\nvar NgProbeToken = (function () {\n /**\n * @param {?} name\n * @param {?} token\n */\n function NgProbeToken(name, token) {\n this.name = name;\n this.token = token;\n }\n return NgProbeToken;\n}());\n/**\n * Creates a platform.\n * Platforms have to be eagerly created via this function.\n *\n * \\@experimental APIs related to application bootstrap are currently under review.\n * @param {?} injector\n * @return {?}\n */\nfunction createPlatform(injector) {\n if (_platform && !_platform.destroyed &&\n !_platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n throw new Error('There can be only one platform. Destroy the previous one to create a new one.');\n }\n _platform = injector.get(PlatformRef);\n var /** @type {?} */ inits = injector.get(PLATFORM_INITIALIZER, null);\n if (inits)\n inits.forEach(function (init) { return init(); });\n return _platform;\n}\n/**\n * Creates a factory for a platform\n *\n * \\@experimental APIs related to application bootstrap are currently under review.\n * @param {?} parentPlatformFactory\n * @param {?} name\n * @param {?=} providers\n * @return {?}\n */\nfunction createPlatformFactory(parentPlatformFactory, name, providers) {\n if (providers === void 0) { providers = []; }\n var /** @type {?} */ marker = new InjectionToken(\"Platform: \" + name);\n return function (extraProviders) {\n if (extraProviders === void 0) { extraProviders = []; }\n var /** @type {?} */ platform = getPlatform();\n if (!platform || platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n if (parentPlatformFactory) {\n parentPlatformFactory(providers.concat(extraProviders).concat({ provide: marker, useValue: true }));\n }\n else {\n createPlatform(ReflectiveInjector.resolveAndCreate(providers.concat(extraProviders).concat({ provide: marker, useValue: true })));\n }\n }\n return assertPlatform(marker);\n };\n}\n/**\n * Checks that there currently is a platform which contains the given token as a provider.\n *\n * \\@experimental APIs related to application bootstrap are currently under review.\n * @param {?} requiredToken\n * @return {?}\n */\nfunction assertPlatform(requiredToken) {\n var /** @type {?} */ platform = getPlatform();\n if (!platform) {\n throw new Error('No platform exists!');\n }\n if (!platform.injector.get(requiredToken, null)) {\n throw new Error('A platform with a different configuration has been created. Please destroy it first.');\n }\n return platform;\n}\n/**\n * Destroy the existing platform.\n *\n * \\@experimental APIs related to application bootstrap are currently under review.\n * @return {?}\n */\nfunction destroyPlatform() {\n if (_platform && !_platform.destroyed) {\n _platform.destroy();\n }\n}\n/**\n * Returns the current platform.\n *\n * \\@experimental APIs related to application bootstrap are currently under review.\n * @return {?}\n */\nfunction getPlatform() {\n return _platform && !_platform.destroyed ? _platform : null;\n}\n/**\n * The Angular platform is the entry point for Angular on a web page. Each page\n * has exactly one platform, and services (such as reflection) which are common\n * to every Angular application running on the page are bound in its scope.\n *\n * A page's platform is initialized implicitly when a platform is created via a platform factory\n * (e.g. {\\@link platformBrowser}), or explicitly by calling the {\\@link createPlatform} function.\n *\n * \\@stable\n * @abstract\n */\nvar PlatformRef = (function () {\n function PlatformRef() {\n }\n /**\n * Creates an instance of an `\\@NgModule` for the given platform\n * for offline compilation.\n *\n * ## Simple Example\n *\n * ```typescript\n * my_module.ts:\n *\n * \\@NgModule({\n * imports: [BrowserModule]\n * })\n * class MyModule {}\n *\n * main.ts:\n * import {MyModuleNgFactory} from './my_module.ngfactory';\n * import {platformBrowser} from '\\@angular/platform-browser';\n *\n * let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);\n * ```\n *\n * \\@experimental APIs related to application bootstrap are currently under review.\n * @abstract\n * @template M\n * @param {?} moduleFactory\n * @return {?}\n */\n PlatformRef.prototype.bootstrapModuleFactory = function (moduleFactory) { };\n /**\n * Creates an instance of an `\\@NgModule` for a given platform using the given runtime compiler.\n *\n * ## Simple Example\n *\n * ```typescript\n * \\@NgModule({\n * imports: [BrowserModule]\n * })\n * class MyModule {}\n *\n * let moduleRef = platformBrowser().bootstrapModule(MyModule);\n * ```\n * \\@stable\n * @abstract\n * @template M\n * @param {?} moduleType\n * @param {?=} compilerOptions\n * @return {?}\n */\n PlatformRef.prototype.bootstrapModule = function (moduleType, compilerOptions) { };\n /**\n * Register a listener to be called when the platform is disposed.\n * @abstract\n * @param {?} callback\n * @return {?}\n */\n PlatformRef.prototype.onDestroy = function (callback) { };\n /**\n * Retrieve the platform {\\@link Injector}, which is the parent injector for\n * every Angular application on the page and provides singleton providers.\n * @abstract\n * @return {?}\n */\n PlatformRef.prototype.injector = function () { };\n /**\n * Destroy the Angular platform and all Angular applications on the page.\n * @abstract\n * @return {?}\n */\n PlatformRef.prototype.destroy = function () { };\n /**\n * @abstract\n * @return {?}\n */\n PlatformRef.prototype.destroyed = function () { };\n return PlatformRef;\n}());\n/**\n * @param {?} errorHandler\n * @param {?} callback\n * @return {?}\n */\nfunction _callAndReportToErrorHandler(errorHandler, callback) {\n try {\n var /** @type {?} */ result = callback();\n if (isPromise(result)) {\n return result.catch(function (e) {\n errorHandler.handleError(e);\n // rethrow as the exception handler might not do it\n throw e;\n });\n }\n return result;\n }\n catch (e) {\n errorHandler.handleError(e);\n // rethrow as the exception handler might not do it\n throw e;\n }\n}\n/**\n * workaround https://github.com/angular/tsickle/issues/350\n * @suppress {checkTypes}\n */\nvar PlatformRef_ = (function (_super) {\n __extends(PlatformRef_, _super);\n /**\n * @param {?} _injector\n */\n function PlatformRef_(_injector) {\n var _this = _super.call(this) || this;\n _this._injector = _injector;\n _this._modules = [];\n _this._destroyListeners = [];\n _this._destroyed = false;\n return _this;\n }\n /**\n * @param {?} callback\n * @return {?}\n */\n PlatformRef_.prototype.onDestroy = function (callback) { this._destroyListeners.push(callback); };\n Object.defineProperty(PlatformRef_.prototype, \"injector\", {\n /**\n * @return {?}\n */\n get: function () { return this._injector; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PlatformRef_.prototype, \"destroyed\", {\n /**\n * @return {?}\n */\n get: function () { return this._destroyed; },\n enumerable: true,\n configurable: true\n });\n /**\n * @return {?}\n */\n PlatformRef_.prototype.destroy = function () {\n if (this._destroyed) {\n throw new Error('The platform has already been destroyed!');\n }\n this._modules.slice().forEach(function (module) { return module.destroy(); });\n this._destroyListeners.forEach(function (listener) { return listener(); });\n this._destroyed = true;\n };\n /**\n * @template M\n * @param {?} moduleFactory\n * @return {?}\n */\n PlatformRef_.prototype.bootstrapModuleFactory = function (moduleFactory) {\n return this._bootstrapModuleFactoryWithZone(moduleFactory);\n };\n /**\n * @template M\n * @param {?} moduleFactory\n * @param {?=} ngZone\n * @return {?}\n */\n PlatformRef_.prototype._bootstrapModuleFactoryWithZone = function (moduleFactory, ngZone) {\n var _this = this;\n // Note: We need to create the NgZone _before_ we instantiate the module,\n // as instantiating the module creates some providers eagerly.\n // So we create a mini parent injector that just contains the new NgZone and\n // pass that as parent to the NgModuleFactory.\n if (!ngZone)\n ngZone = new NgZone({ enableLongStackTrace: isDevMode() });\n // Attention: Don't use ApplicationRef.run here,\n // as we want to be sure that all possible constructor calls are inside `ngZone.run`!\n return ngZone.run(function () {\n var /** @type {?} */ ngZoneInjector = ReflectiveInjector.resolveAndCreate([{ provide: NgZone, useValue: ngZone }], _this.injector);\n var /** @type {?} */ moduleRef = (moduleFactory.create(ngZoneInjector));\n var /** @type {?} */ exceptionHandler = moduleRef.injector.get(ErrorHandler, null);\n if (!exceptionHandler) {\n throw new Error('No ErrorHandler. Is platform module (BrowserModule) included?');\n }\n moduleRef.onDestroy(function () { return remove(_this._modules, moduleRef); }); /** @type {?} */\n ((ngZone)).onError.subscribe({ next: function (error) { exceptionHandler.handleError(error); } });\n return _callAndReportToErrorHandler(exceptionHandler, function () {\n var /** @type {?} */ initStatus = moduleRef.injector.get(ApplicationInitStatus);\n initStatus.runInitializers();\n return initStatus.donePromise.then(function () {\n _this._moduleDoBootstrap(moduleRef);\n return moduleRef;\n });\n });\n });\n };\n /**\n * @template M\n * @param {?} moduleType\n * @param {?=} compilerOptions\n * @return {?}\n */\n PlatformRef_.prototype.bootstrapModule = function (moduleType, compilerOptions) {\n if (compilerOptions === void 0) { compilerOptions = []; }\n return this._bootstrapModuleWithZone(moduleType, compilerOptions);\n };\n /**\n * @template M\n * @param {?} moduleType\n * @param {?=} compilerOptions\n * @param {?=} ngZone\n * @return {?}\n */\n PlatformRef_.prototype._bootstrapModuleWithZone = function (moduleType, compilerOptions, ngZone) {\n var _this = this;\n if (compilerOptions === void 0) { compilerOptions = []; }\n var /** @type {?} */ compilerFactory = this.injector.get(CompilerFactory);\n var /** @type {?} */ compiler = compilerFactory.createCompiler(Array.isArray(compilerOptions) ? compilerOptions : [compilerOptions]);\n return compiler.compileModuleAsync(moduleType)\n .then(function (moduleFactory) { return _this._bootstrapModuleFactoryWithZone(moduleFactory, ngZone); });\n };\n /**\n * @param {?} moduleRef\n * @return {?}\n */\n PlatformRef_.prototype._moduleDoBootstrap = function (moduleRef) {\n var /** @type {?} */ appRef = moduleRef.injector.get(ApplicationRef);\n if (moduleRef.bootstrapFactories.length > 0) {\n moduleRef.bootstrapFactories.forEach(function (f) { return appRef.bootstrap(f); });\n }\n else if (moduleRef.instance.ngDoBootstrap) {\n moduleRef.instance.ngDoBootstrap(appRef);\n }\n else {\n throw new Error(\"The module \" + stringify(moduleRef.instance.constructor) + \" was bootstrapped, but it does not declare \\\"@NgModule.bootstrap\\\" components nor a \\\"ngDoBootstrap\\\" method. \" +\n \"Please define one of these.\");\n }\n this._modules.push(moduleRef);\n };\n return PlatformRef_;\n}(PlatformRef));\nPlatformRef_.decorators = [\n { type: Injectable },\n];\n/**\n * @nocollapse\n */\nPlatformRef_.ctorParameters = function () { return [\n { type: Injector, },\n]; };\n/**\n * A reference to an Angular application running on a page.\n *\n * \\@stable\n * @abstract\n */\nvar ApplicationRef = (function () {\n function ApplicationRef() {\n }\n /**\n * Bootstrap a new component at the root level of the application.\n *\n * ### Bootstrap process\n *\n * When bootstrapping a new root component into an application, Angular mounts the\n * specified application component onto DOM elements identified by the [componentType]'s\n * selector and kicks off automatic change detection to finish initializing the component.\n *\n * ### Example\n * {\\@example core/ts/platform/platform.ts region='longform'}\n * @abstract\n * @template C\n * @param {?} componentFactory\n * @return {?}\n */\n ApplicationRef.prototype.bootstrap = function (componentFactory) { };\n /**\n * Invoke this method to explicitly process change detection and its side-effects.\n *\n * In development mode, `tick()` also performs a second change detection cycle to ensure that no\n * further changes are detected. If additional changes are picked up during this second cycle,\n * bindings in the app have side-effects that cannot be resolved in a single change detection\n * pass.\n * In this case, Angular throws an error, since an Angular application can only have one change\n * detection pass during which all change detection must complete.\n * @abstract\n * @return {?}\n */\n ApplicationRef.prototype.tick = function () { };\n /**\n * Get a list of component types registered to this application.\n * This list is populated even before the component is created.\n * @abstract\n * @return {?}\n */\n ApplicationRef.prototype.componentTypes = function () { };\n /**\n * Get a list of components registered to this application.\n * @abstract\n * @return {?}\n */\n ApplicationRef.prototype.components = function () { };\n /**\n * Attaches a view so that it will be dirty checked.\n * The view will be automatically detached when it is destroyed.\n * This will throw if the view is already attached to a ViewContainer.\n * @abstract\n * @param {?} view\n * @return {?}\n */\n ApplicationRef.prototype.attachView = function (view) { };\n /**\n * Detaches a view from dirty checking again.\n * @abstract\n * @param {?} view\n * @return {?}\n */\n ApplicationRef.prototype.detachView = function (view) { };\n /**\n * Returns the number of attached views.\n * @abstract\n * @return {?}\n */\n ApplicationRef.prototype.viewCount = function () { };\n /**\n * Returns an Observable that indicates when the application is stable or unstable.\n * @abstract\n * @return {?}\n */\n ApplicationRef.prototype.isStable = function () { };\n return ApplicationRef;\n}());\n/**\n * workaround https://github.com/angular/tsickle/issues/350\n * @suppress {checkTypes}\n */\nvar ApplicationRef_ = (function (_super) {\n __extends(ApplicationRef_, _super);\n /**\n * @param {?} _zone\n * @param {?} _console\n * @param {?} _injector\n * @param {?} _exceptionHandler\n * @param {?} _componentFactoryResolver\n * @param {?} _initStatus\n */\n function ApplicationRef_(_zone, _console, _injector, _exceptionHandler, _componentFactoryResolver, _initStatus) {\n var _this = _super.call(this) || this;\n _this._zone = _zone;\n _this._console = _console;\n _this._injector = _injector;\n _this._exceptionHandler = _exceptionHandler;\n _this._componentFactoryResolver = _componentFactoryResolver;\n _this._initStatus = _initStatus;\n _this._bootstrapListeners = [];\n _this._rootComponents = [];\n _this._rootComponentTypes = [];\n _this._views = [];\n _this._runningTick = false;\n _this._enforceNoNewChanges = false;\n _this._stable = true;\n _this._enforceNoNewChanges = isDevMode();\n _this._zone.onMicrotaskEmpty.subscribe({ next: function () { _this._zone.run(function () { _this.tick(); }); } });\n var isCurrentlyStable = new Observable(function (observer) {\n _this._stable = _this._zone.isStable && !_this._zone.hasPendingMacrotasks &&\n !_this._zone.hasPendingMicrotasks;\n _this._zone.runOutsideAngular(function () {\n observer.next(_this._stable);\n observer.complete();\n });\n });\n var isStable = new Observable(function (observer) {\n var stableSub = _this._zone.onStable.subscribe(function () {\n NgZone.assertNotInAngularZone();\n // Check whether there are no pending macro/micro tasks in the next tick\n // to allow for NgZone to update the state.\n scheduleMicroTask(function () {\n if (!_this._stable && !_this._zone.hasPendingMacrotasks &&\n !_this._zone.hasPendingMicrotasks) {\n _this._stable = true;\n observer.next(true);\n }\n });\n });\n var unstableSub = _this._zone.onUnstable.subscribe(function () {\n NgZone.assertInAngularZone();\n if (_this._stable) {\n _this._stable = false;\n _this._zone.runOutsideAngular(function () { observer.next(false); });\n }\n });\n return function () {\n stableSub.unsubscribe();\n unstableSub.unsubscribe();\n };\n });\n _this._isStable = merge(isCurrentlyStable, share.call(isStable));\n return _this;\n }\n /**\n * @param {?} viewRef\n * @return {?}\n */\n ApplicationRef_.prototype.attachView = function (viewRef) {\n var /** @type {?} */ view = ((viewRef));\n this._views.push(view);\n view.attachToAppRef(this);\n };\n /**\n * @param {?} viewRef\n * @return {?}\n */\n ApplicationRef_.prototype.detachView = function (viewRef) {\n var /** @type {?} */ view = ((viewRef));\n remove(this._views, view);\n view.detachFromAppRef();\n };\n /**\n * @template C\n * @param {?} componentOrFactory\n * @return {?}\n */\n ApplicationRef_.prototype.bootstrap = function (componentOrFactory) {\n var _this = this;\n if (!this._initStatus.done) {\n throw new Error('Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.');\n }\n var /** @type {?} */ componentFactory;\n if (componentOrFactory instanceof ComponentFactory) {\n componentFactory = componentOrFactory;\n }\n else {\n componentFactory = ((this._componentFactoryResolver.resolveComponentFactory(componentOrFactory)));\n }\n this._rootComponentTypes.push(componentFactory.componentType);\n // Create a factory associated with the current module if it's not bound to some other\n var /** @type {?} */ ngModule = componentFactory instanceof ComponentFactoryBoundToModule ?\n null :\n this._injector.get(NgModuleRef);\n var /** @type {?} */ compRef = componentFactory.create(Injector.NULL, [], componentFactory.selector, ngModule);\n compRef.onDestroy(function () { _this._unloadComponent(compRef); });\n var /** @type {?} */ testability = compRef.injector.get(Testability, null);\n if (testability) {\n compRef.injector.get(TestabilityRegistry)\n .registerApplication(compRef.location.nativeElement, testability);\n }\n this._loadComponent(compRef);\n if (isDevMode()) {\n this._console.log(\"Angular is running in the development mode. Call enableProdMode() to enable the production mode.\");\n }\n return compRef;\n };\n /**\n * @param {?} componentRef\n * @return {?}\n */\n ApplicationRef_.prototype._loadComponent = function (componentRef) {\n this.attachView(componentRef.hostView);\n this.tick();\n this._rootComponents.push(componentRef);\n // Get the listeners lazily to prevent DI cycles.\n var /** @type {?} */ listeners = this._injector.get(APP_BOOTSTRAP_LISTENER, []).concat(this._bootstrapListeners);\n listeners.forEach(function (listener) { return listener(componentRef); });\n };\n /**\n * @param {?} componentRef\n * @return {?}\n */\n ApplicationRef_.prototype._unloadComponent = function (componentRef) {\n this.detachView(componentRef.hostView);\n remove(this._rootComponents, componentRef);\n };\n /**\n * @return {?}\n */\n ApplicationRef_.prototype.tick = function () {\n if (this._runningTick) {\n throw new Error('ApplicationRef.tick is called recursively');\n }\n var /** @type {?} */ scope = ApplicationRef_._tickScope();\n try {\n this._runningTick = true;\n this._views.forEach(function (view) { return view.detectChanges(); });\n if (this._enforceNoNewChanges) {\n this._views.forEach(function (view) { return view.checkNoChanges(); });\n }\n }\n catch (e) {\n // Attention: Don't rethrow as it could cancel subscriptions to Observables!\n this._exceptionHandler.handleError(e);\n }\n finally {\n this._runningTick = false;\n wtfLeave(scope);\n }\n };\n /**\n * @return {?}\n */\n ApplicationRef_.prototype.ngOnDestroy = function () {\n // TODO(alxhub): Dispose of the NgZone.\n this._views.slice().forEach(function (view) { return view.destroy(); });\n };\n Object.defineProperty(ApplicationRef_.prototype, \"viewCount\", {\n /**\n * @return {?}\n */\n get: function () { return this._views.length; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ApplicationRef_.prototype, \"componentTypes\", {\n /**\n * @return {?}\n */\n get: function () { return this._rootComponentTypes; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ApplicationRef_.prototype, \"components\", {\n /**\n * @return {?}\n */\n get: function () { return this._rootComponents; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ApplicationRef_.prototype, \"isStable\", {\n /**\n * @return {?}\n */\n get: function () { return this._isStable; },\n enumerable: true,\n configurable: true\n });\n return ApplicationRef_;\n}(ApplicationRef));\n/**\n * \\@internal\n */\nApplicationRef_._tickScope = wtfCreateScope('ApplicationRef#tick()');\nApplicationRef_.decorators = [\n { type: Injectable },\n];\n/**\n * @nocollapse\n */\nApplicationRef_.ctorParameters = function () { return [\n { type: NgZone, },\n { type: Console, },\n { type: Injector, },\n { type: ErrorHandler, },\n { type: ComponentFactoryResolver, },\n { type: ApplicationInitStatus, },\n]; };\n/**\n * @template T\n * @param {?} list\n * @param {?} el\n * @return {?}\n */\nfunction remove(list, el) {\n var /** @type {?} */ index = list.indexOf(el);\n if (index > -1) {\n list.splice(index, 1);\n }\n}\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Public API for Zone\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @deprecated Use `RendererType2` (and `Renderer2`) instead.\n */\nvar RenderComponentType = (function () {\n /**\n * @param {?} id\n * @param {?} templateUrl\n * @param {?} slotCount\n * @param {?} encapsulation\n * @param {?} styles\n * @param {?} animations\n */\n function RenderComponentType(id, templateUrl, slotCount, encapsulation, styles, animations) {\n this.id = id;\n this.templateUrl = templateUrl;\n this.slotCount = slotCount;\n this.encapsulation = encapsulation;\n this.styles = styles;\n this.animations = animations;\n }\n return RenderComponentType;\n}());\n/**\n * @deprecated Debug info is handeled internally in the view engine now.\n * @abstract\n */\nvar RenderDebugInfo = (function () {\n function RenderDebugInfo() {\n }\n /**\n * @abstract\n * @return {?}\n */\n RenderDebugInfo.prototype.injector = function () { };\n /**\n * @abstract\n * @return {?}\n */\n RenderDebugInfo.prototype.component = function () { };\n /**\n * @abstract\n * @return {?}\n */\n RenderDebugInfo.prototype.providerTokens = function () { };\n /**\n * @abstract\n * @return {?}\n */\n RenderDebugInfo.prototype.references = function () { };\n /**\n * @abstract\n * @return {?}\n */\n RenderDebugInfo.prototype.context = function () { };\n /**\n * @abstract\n * @return {?}\n */\n RenderDebugInfo.prototype.source = function () { };\n return RenderDebugInfo;\n}());\n/**\n * @deprecated Use the `Renderer2` instead.\n * @abstract\n */\nvar Renderer = (function () {\n function Renderer() {\n }\n /**\n * @abstract\n * @param {?} selectorOrNode\n * @param {?=} debugInfo\n * @return {?}\n */\n Renderer.prototype.selectRootElement = function (selectorOrNode, debugInfo) { };\n /**\n * @abstract\n * @param {?} parentElement\n * @param {?} name\n * @param {?=} debugInfo\n * @return {?}\n */\n Renderer.prototype.createElement = function (parentElement, name, debugInfo) { };\n /**\n * @abstract\n * @param {?} hostElement\n * @return {?}\n */\n Renderer.prototype.createViewRoot = function (hostElement) { };\n /**\n * @abstract\n * @param {?} parentElement\n * @param {?=} debugInfo\n * @return {?}\n */\n Renderer.prototype.createTemplateAnchor = function (parentElement, debugInfo) { };\n /**\n * @abstract\n * @param {?} parentElement\n * @param {?} value\n * @param {?=} debugInfo\n * @return {?}\n */\n Renderer.prototype.createText = function (parentElement, value, debugInfo) { };\n /**\n * @abstract\n * @param {?} parentElement\n * @param {?} nodes\n * @return {?}\n */\n Renderer.prototype.projectNodes = function (parentElement, nodes) { };\n /**\n * @abstract\n * @param {?} node\n * @param {?} viewRootNodes\n * @return {?}\n */\n Renderer.prototype.attachViewAfter = function (node, viewRootNodes) { };\n /**\n * @abstract\n * @param {?} viewRootNodes\n * @return {?}\n */\n Renderer.prototype.detachView = function (viewRootNodes) { };\n /**\n * @abstract\n * @param {?} hostElement\n * @param {?} viewAllNodes\n * @return {?}\n */\n Renderer.prototype.destroyView = function (hostElement, viewAllNodes) { };\n /**\n * @abstract\n * @param {?} renderElement\n * @param {?} name\n * @param {?} callback\n * @return {?}\n */\n Renderer.prototype.listen = function (renderElement, name, callback) { };\n /**\n * @abstract\n * @param {?} target\n * @param {?} name\n * @param {?} callback\n * @return {?}\n */\n Renderer.prototype.listenGlobal = function (target, name, callback) { };\n /**\n * @abstract\n * @param {?} renderElement\n * @param {?} propertyName\n * @param {?} propertyValue\n * @return {?}\n */\n Renderer.prototype.setElementProperty = function (renderElement, propertyName, propertyValue) { };\n /**\n * @abstract\n * @param {?} renderElement\n * @param {?} attributeName\n * @param {?} attributeValue\n * @return {?}\n */\n Renderer.prototype.setElementAttribute = function (renderElement, attributeName, attributeValue) { };\n /**\n * Used only in debug mode to serialize property changes to dom nodes as attributes.\n * @abstract\n * @param {?} renderElement\n * @param {?} propertyName\n * @param {?} propertyValue\n * @return {?}\n */\n Renderer.prototype.setBindingDebugInfo = function (renderElement, propertyName, propertyValue) { };\n /**\n * @abstract\n * @param {?} renderElement\n * @param {?} className\n * @param {?} isAdd\n * @return {?}\n */\n Renderer.prototype.setElementClass = function (renderElement, className, isAdd) { };\n /**\n * @abstract\n * @param {?} renderElement\n * @param {?} styleName\n * @param {?} styleValue\n * @return {?}\n */\n Renderer.prototype.setElementStyle = function (renderElement, styleName, styleValue) { };\n /**\n * @abstract\n * @param {?} renderElement\n * @param {?} methodName\n * @param {?=} args\n * @return {?}\n */\n Renderer.prototype.invokeElementMethod = function (renderElement, methodName, args) { };\n /**\n * @abstract\n * @param {?} renderNode\n * @param {?} text\n * @return {?}\n */\n Renderer.prototype.setText = function (renderNode, text) { };\n /**\n * @abstract\n * @param {?} element\n * @param {?} startingStyles\n * @param {?} keyframes\n * @param {?} duration\n * @param {?} delay\n * @param {?} easing\n * @param {?=} previousPlayers\n * @return {?}\n */\n Renderer.prototype.animate = function (element, startingStyles, keyframes, duration, delay, easing, previousPlayers) { };\n return Renderer;\n}());\nvar Renderer2Interceptor = new InjectionToken('Renderer2Interceptor');\n/**\n * Injectable service that provides a low-level interface for modifying the UI.\n *\n * Use this service to bypass Angular's templating and make custom UI changes that can't be\n * expressed declaratively. For example if you need to set a property or an attribute whose name is\n * not statically known, use {\\@link Renderer#setElementProperty} or {\\@link\n * Renderer#setElementAttribute}\n * respectively.\n *\n * If you are implementing a custom renderer, you must implement this interface.\n *\n * The default Renderer implementation is `DomRenderer`. Also available is `WebWorkerRenderer`.\n *\n * @deprecated Use `RendererFactory2` instead.\n * @abstract\n */\nvar RootRenderer = (function () {\n function RootRenderer() {\n }\n /**\n * @abstract\n * @param {?} componentType\n * @return {?}\n */\n RootRenderer.prototype.renderComponent = function (componentType) { };\n return RootRenderer;\n}());\n/**\n * \\@experimental\n * @abstract\n */\nvar RendererFactory2 = (function () {\n function RendererFactory2() {\n }\n /**\n * @abstract\n * @param {?} hostElement\n * @param {?} type\n * @return {?}\n */\n RendererFactory2.prototype.createRenderer = function (hostElement, type) { };\n return RendererFactory2;\n}());\nvar RendererStyleFlags2 = {};\nRendererStyleFlags2.Important = 1;\nRendererStyleFlags2.DashCase = 2;\nRendererStyleFlags2[RendererStyleFlags2.Important] = \"Important\";\nRendererStyleFlags2[RendererStyleFlags2.DashCase] = \"DashCase\";\n/**\n * \\@experimental\n * @abstract\n */\nvar Renderer2 = (function () {\n function Renderer2() {\n }\n /**\n * This field can be used to store arbitrary data on this renderer instance.\n * This is useful for renderers that delegate to other renderers.\n * @abstract\n * @return {?}\n */\n Renderer2.prototype.data = function () { };\n /**\n * @abstract\n * @return {?}\n */\n Renderer2.prototype.destroy = function () { };\n /**\n * @abstract\n * @param {?} name\n * @param {?=} namespace\n * @return {?}\n */\n Renderer2.prototype.createElement = function (name, namespace) { };\n /**\n * @abstract\n * @param {?} value\n * @return {?}\n */\n Renderer2.prototype.createComment = function (value) { };\n /**\n * @abstract\n * @param {?} value\n * @return {?}\n */\n Renderer2.prototype.createText = function (value) { };\n /**\n * @abstract\n * @param {?} parent\n * @param {?} newChild\n * @return {?}\n */\n Renderer2.prototype.appendChild = function (parent, newChild) { };\n /**\n * @abstract\n * @param {?} parent\n * @param {?} newChild\n * @param {?} refChild\n * @return {?}\n */\n Renderer2.prototype.insertBefore = function (parent, newChild, refChild) { };\n /**\n * @abstract\n * @param {?} parent\n * @param {?} oldChild\n * @return {?}\n */\n Renderer2.prototype.removeChild = function (parent, oldChild) { };\n /**\n * @abstract\n * @param {?} selectorOrNode\n * @return {?}\n */\n Renderer2.prototype.selectRootElement = function (selectorOrNode) { };\n /**\n * Attention: On WebWorkers, this will always return a value,\n * as we are asking for a result synchronously. I.e.\n * the caller can't rely on checking whether this is null or not.\n * @abstract\n * @param {?} node\n * @return {?}\n */\n Renderer2.prototype.parentNode = function (node) { };\n /**\n * Attention: On WebWorkers, this will always return a value,\n * as we are asking for a result synchronously. I.e.\n * the caller can't rely on checking whether this is null or not.\n * @abstract\n * @param {?} node\n * @return {?}\n */\n Renderer2.prototype.nextSibling = function (node) { };\n /**\n * @abstract\n * @param {?} el\n * @param {?} name\n * @param {?} value\n * @param {?=} namespace\n * @return {?}\n */\n Renderer2.prototype.setAttribute = function (el, name, value, namespace) { };\n /**\n * @abstract\n * @param {?} el\n * @param {?} name\n * @param {?=} namespace\n * @return {?}\n */\n Renderer2.prototype.removeAttribute = function (el, name, namespace) { };\n /**\n * @abstract\n * @param {?} el\n * @param {?} name\n * @return {?}\n */\n Renderer2.prototype.addClass = function (el, name) { };\n /**\n * @abstract\n * @param {?} el\n * @param {?} name\n * @return {?}\n */\n Renderer2.prototype.removeClass = function (el, name) { };\n /**\n * @abstract\n * @param {?} el\n * @param {?} style\n * @param {?} value\n * @param {?=} flags\n * @return {?}\n */\n Renderer2.prototype.setStyle = function (el, style, value, flags) { };\n /**\n * @abstract\n * @param {?} el\n * @param {?} style\n * @param {?=} flags\n * @return {?}\n */\n Renderer2.prototype.removeStyle = function (el, style, flags) { };\n /**\n * @abstract\n * @param {?} el\n * @param {?} name\n * @param {?} value\n * @return {?}\n */\n Renderer2.prototype.setProperty = function (el, name, value) { };\n /**\n * @abstract\n * @param {?} node\n * @param {?} value\n * @return {?}\n */\n Renderer2.prototype.setValue = function (node, value) { };\n /**\n * @abstract\n * @param {?} target\n * @param {?} eventName\n * @param {?} callback\n * @return {?}\n */\n Renderer2.prototype.listen = function (target, eventName, callback) { };\n return Renderer2;\n}());\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Public API for render\nvar ElementRef = (function () {\n /**\n * @param {?} nativeElement\n */\n function ElementRef(nativeElement) {\n this.nativeElement = nativeElement;\n }\n return ElementRef;\n}());\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Used to load ng module factories.\n * \\@stable\n * @abstract\n */\nvar NgModuleFactoryLoader = (function () {\n function NgModuleFactoryLoader() {\n }\n /**\n * @abstract\n * @param {?} path\n * @return {?}\n */\n NgModuleFactoryLoader.prototype.load = function (path) { };\n return NgModuleFactoryLoader;\n}());\nvar moduleFactories = new Map();\n/**\n * Registers a loaded module. Should only be called from generated NgModuleFactory code.\n * \\@experimental\n * @param {?} id\n * @param {?} factory\n * @return {?}\n */\nfunction registerModuleFactory(id, factory) {\n var /** @type {?} */ existing = moduleFactories.get(id);\n if (existing) {\n throw new Error(\"Duplicate module registered for \" + id + \" - \" + existing.moduleType.name + \" vs \" + factory.moduleType.name);\n }\n moduleFactories.set(id, factory);\n}\n/**\n * @return {?}\n */\n/**\n * Returns the NgModuleFactory with the given id, if it exists and has been loaded.\n * Factories for modules that do not specify an `id` cannot be retrieved. Throws if the module\n * cannot be found.\n * \\@experimental\n * @param {?} id\n * @return {?}\n */\nfunction getModuleFactory(id) {\n var /** @type {?} */ factory = moduleFactories.get(id);\n if (!factory)\n throw new Error(\"No module with ID \" + id + \" loaded\");\n return factory;\n}\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * An unmodifiable list of items that Angular keeps up to date when the state\n * of the application changes.\n *\n * The type of object that {\\@link ViewChildren}, {\\@link ContentChildren}, and {\\@link QueryList}\n * provide.\n *\n * Implements an iterable interface, therefore it can be used in both ES6\n * javascript `for (var i of items)` loops as well as in Angular templates with\n * `*ngFor=\"let i of myList\"`.\n *\n * Changes can be observed by subscribing to the changes `Observable`.\n *\n * NOTE: In the future this class will implement an `Observable` interface.\n *\n * ### Example ([live demo](http://plnkr.co/edit/RX8sJnQYl9FWuSCWme5z?p=preview))\n * ```typescript\n * \\@Component({...})\n * class Container {\n * \\@ViewChildren(Item) items:QueryList