|
43 | 43 | return store[key] || (store[key] = value !== undefined ? value : {}); |
44 | 44 | })('versions', []).push({ |
45 | 45 | version: _core.version, |
46 | | - mode: _library ? 'pure' : 'global', |
| 46 | + mode: 'global', |
47 | 47 | copyright: '© 2019 Denis Pushkarev (zloirock.ru)' |
48 | 48 | }); |
49 | 49 | }); |
|
614 | 614 |
|
615 | 615 | var defineProperty = _objectDp.f; |
616 | 616 | var _wksDefine = function (name) { |
617 | | - var $Symbol = _core.Symbol || (_core.Symbol = _library ? {} : _global.Symbol || {}); |
| 617 | + var $Symbol = _core.Symbol || (_core.Symbol = _global.Symbol || {}); |
618 | 618 | if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: _wksExt.f(name) }); |
619 | 619 | }; |
620 | 620 |
|
|
3950 | 3950 |
|
3951 | 3951 | function getPromiseCtor(promiseCtor) { |
3952 | 3952 | if (!promiseCtor) { |
3953 | | - promiseCtor = Promise; |
| 3953 | + promiseCtor = config.Promise || Promise; |
3954 | 3954 | } |
3955 | 3955 |
|
3956 | 3956 | if (!promiseCtor) { |
|
10794 | 10794 | * |
10795 | 10795 | * Use an `InjectionToken` whenever the type you are injecting is not reified (does not have a |
10796 | 10796 | * runtime representation) such as when injecting an interface, callable type, array or |
10797 | | - * parametrized type. |
| 10797 | + * parameterized type. |
10798 | 10798 | * |
10799 | 10799 | * `InjectionToken` is parameterized on `T` which is the type of object which will be returned by |
10800 | 10800 | * the `Injector`. This provides additional level of type safety. |
@@ -10851,15 +10851,16 @@ |
10851 | 10851 | * Use of this source code is governed by an MIT-style license that can be |
10852 | 10852 | * found in the LICENSE file at https://angular.io/license |
10853 | 10853 | */ /** |
10854 | | - * This token can be used to create a virtual provider that will populate the |
10855 | | - * `entryComponents` fields of components and ng modules based on its `useValue`. |
| 10854 | + * A DI token that you can use to create a virtual [provider](guide/glossary#provider) |
| 10855 | + * that will populate the `entryComponents` field of components and NgModules |
| 10856 | + * based on its `useValue` property value. |
10856 | 10857 | * All components that are referenced in the `useValue` value (either directly |
10857 | | - * or in a nested array or map) will be added to the `entryComponents` property. |
| 10858 | + * or in a nested array or map) are added to the `entryComponents` property. |
10858 | 10859 | * |
10859 | 10860 | * @usageNotes |
10860 | | - * ### Example |
| 10861 | + * |
10861 | 10862 | * The following example shows how the router can populate the `entryComponents` |
10862 | | - * field of an NgModule based on the router configuration which refers |
| 10863 | + * field of an NgModule based on a router configuration that refers |
10863 | 10864 | * to components. |
10864 | 10865 | * |
10865 | 10866 | * ```typescript |
|
10936 | 10937 | * Use the `CheckOnce` strategy, meaning that automatic change detection is deactivated |
10937 | 10938 | * until reactivated by setting the strategy to `Default` (`CheckAlways`). |
10938 | 10939 | * Change detection can still be explicitly invoked. |
| 10940 | + * This strategy applies to all child directives and cannot be overridden. |
10939 | 10941 | */ChangeDetectionStrategy[ChangeDetectionStrategy["OnPush"]=0]="OnPush";/** |
10940 | 10942 | * Use the default `CheckAlways` strategy, in which change detection is automatic until |
10941 | 10943 | * explicitly deactivated. |
|
12679 | 12681 | * @publicApi |
12680 | 12682 | */var Version=/** @class */function(){function Version(full){this.full=full;this.major=full.split('.')[0];this.minor=full.split('.')[1];this.patch=full.split('.').slice(2).join('.');}return Version;}();/** |
12681 | 12683 | * @publicApi |
12682 | | - */var VERSION=new Version('7.2.0');/** |
| 12684 | + */var VERSION=new Version('7.2.14');/** |
12683 | 12685 | * @license |
12684 | 12686 | * Copyright Google Inc. All Rights Reserved. |
12685 | 12687 | * |
|
12762 | 12764 | // NB: Sanitization does not allow <form> elements or other active elements (<button> etc). Those |
12763 | 12765 | // can be sanitized, but they increase security surface area without a legitimate use case, so they |
12764 | 12766 | // are left out here. |
12765 | | - var VALID_ATTRS=merge$1$1(URI_ATTRS,SRCSET_ATTRS,HTML_ATTRS);var Plural;(function(Plural){Plural[Plural["Zero"]=0]="Zero";Plural[Plural["One"]=1]="One";Plural[Plural["Two"]=2]="Two";Plural[Plural["Few"]=3]="Few";Plural[Plural["Many"]=4]="Many";Plural[Plural["Other"]=5]="Other";})(Plural||(Plural={}));/** |
| 12767 | + var VALID_ATTRS=merge$1$1(URI_ATTRS,SRCSET_ATTRS,HTML_ATTRS);// Elements whose content should not be traversed/preserved, if the elements themselves are invalid. |
| 12768 | + // |
| 12769 | + // Typically, `<invalid>Some content</invalid>` would traverse (and in this case preserve) |
| 12770 | + // `Some content`, but strip `invalid-element` opening/closing tags. For some elements, though, we |
| 12771 | + // don't want to preserve the content, if the elements themselves are going to be removed. |
| 12772 | + var SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS=tagSet('script,style,template');var Plural;(function(Plural){Plural[Plural["Zero"]=0]="Zero";Plural[Plural["One"]=1]="One";Plural[Plural["Two"]=2]="Two";Plural[Plural["Few"]=3]="Few";Plural[Plural["Many"]=4]="Many";Plural[Plural["Other"]=5]="Other";})(Plural||(Plural={}));/** |
12766 | 12773 | * @license |
12767 | 12774 | * Copyright Google Inc. All Rights Reserved. |
12768 | 12775 | * |
|
12990 | 12997 | * @Annotation |
12991 | 12998 | * @publicApi |
12992 | 12999 | */var Pipe=makeDecorator('Pipe',function(p){return _assign({pure:true},p);},undefined,undefined,function(type,meta){return SWITCH_COMPILE_PIPE(type,meta);});var initializeBaseDef=function initializeBaseDef(target){var constructor=target.constructor;var inheritedBaseDef=constructor.ngBaseDef;var baseDef=constructor.ngBaseDef={inputs:{},outputs:{},declaredInputs:{}};if(inheritedBaseDef){fillProperties(baseDef.inputs,inheritedBaseDef.inputs);fillProperties(baseDef.outputs,inheritedBaseDef.outputs);fillProperties(baseDef.declaredInputs,inheritedBaseDef.declaredInputs);}};/** |
12993 | | - * Does the work of creating the `ngBaseDef` property for the @Input and @Output decorators. |
| 13000 | + * Does the work of creating the `ngBaseDef` property for the `Input` and `Output` decorators. |
12994 | 13001 | * @param key "inputs" or "outputs" |
12995 | 13002 | */var updateBaseDefFromIOProp=function updateBaseDefFromIOProp(getProp){return function(target,name){var args=[];for(var _i=2;_i<arguments.length;_i++){args[_i-2]=arguments[_i];}var constructor=target.constructor;if(!constructor.hasOwnProperty(NG_BASE_DEF)){initializeBaseDef(target);}var baseDef=constructor.ngBaseDef;var defProp=getProp(baseDef);defProp[name]=args[0];};};/** |
12996 | 13003 | * @Annotation |
|
13886 | 13893 | throw e;}}function optionsReducer(dst,objs){if(Array.isArray(objs)){dst=objs.reduce(optionsReducer,dst);}else{dst=_assign({},dst,objs);}return dst;}/** |
13887 | 13894 | * A reference to an Angular application running on a page. |
13888 | 13895 | * |
| 13896 | + * @usageNotes |
| 13897 | + * |
| 13898 | + * {@a is-stable-examples} |
| 13899 | + * ### isStable examples and caveats |
| 13900 | + * |
| 13901 | + * Note two important points about `isStable`, demonstrated in the examples below: |
| 13902 | + * - the application will never be stable if you start any kind |
| 13903 | + * of recurrent asynchronous task when the application starts |
| 13904 | + * (for example for a polling process, started with a `setInterval`, a `setTimeout` |
| 13905 | + * or using RxJS operators like `interval`); |
| 13906 | + * - the `isStable` Observable runs outside of the Angular zone. |
| 13907 | + * |
| 13908 | + * Let's imagine that you start a recurrent task |
| 13909 | + * (here incrementing a counter, using RxJS `interval`), |
| 13910 | + * and at the same time subscribe to `isStable`. |
| 13911 | + * |
| 13912 | + * ``` |
| 13913 | + * constructor(appRef: ApplicationRef) { |
| 13914 | + * appRef.isStable.pipe( |
| 13915 | + * filter(stable => stable) |
| 13916 | + * ).subscribe(() => console.log('App is stable now'); |
| 13917 | + * interval(1000).subscribe(counter => console.log(counter)); |
| 13918 | + * } |
| 13919 | + * ``` |
| 13920 | + * In this example, `isStable` will never emit `true`, |
| 13921 | + * and the trace "App is stable now" will never get logged. |
| 13922 | + * |
| 13923 | + * If you want to execute something when the app is stable, |
| 13924 | + * you have to wait for the application to be stable |
| 13925 | + * before starting your polling process. |
| 13926 | + * |
| 13927 | + * ``` |
| 13928 | + * constructor(appRef: ApplicationRef) { |
| 13929 | + * appRef.isStable.pipe( |
| 13930 | + * first(stable => stable), |
| 13931 | + * tap(stable => console.log('App is stable now')), |
| 13932 | + * switchMap(() => interval(1000)) |
| 13933 | + * ).subscribe(counter => console.log(counter)); |
| 13934 | + * } |
| 13935 | + * ``` |
| 13936 | + * In this example, the trace "App is stable now" will be logged |
| 13937 | + * and then the counter starts incrementing every second. |
| 13938 | + * |
| 13939 | + * Note also that this Observable runs outside of the Angular zone, |
| 13940 | + * which means that the code in the subscription |
| 13941 | + * to this Observable will not trigger the change detection. |
| 13942 | + * |
| 13943 | + * Let's imagine that instead of logging the counter value, |
| 13944 | + * you update a field of your component |
| 13945 | + * and display it in its template. |
| 13946 | + * |
| 13947 | + * ``` |
| 13948 | + * constructor(appRef: ApplicationRef) { |
| 13949 | + * appRef.isStable.pipe( |
| 13950 | + * first(stable => stable), |
| 13951 | + * switchMap(() => interval(1000)) |
| 13952 | + * ).subscribe(counter => this.value = counter); |
| 13953 | + * } |
| 13954 | + * ``` |
| 13955 | + * As the `isStable` Observable runs outside the zone, |
| 13956 | + * the `value` field will be updated properly, |
| 13957 | + * but the template will not be refreshed! |
| 13958 | + * |
| 13959 | + * You'll have to manually trigger the change detection to update the template. |
| 13960 | + * |
| 13961 | + * ``` |
| 13962 | + * constructor(appRef: ApplicationRef, cd: ChangeDetectorRef) { |
| 13963 | + * appRef.isStable.pipe( |
| 13964 | + * first(stable => stable), |
| 13965 | + * switchMap(() => interval(1000)) |
| 13966 | + * ).subscribe(counter => { |
| 13967 | + * this.value = counter; |
| 13968 | + * cd.detectChanges(); |
| 13969 | + * }); |
| 13970 | + * } |
| 13971 | + * ``` |
| 13972 | + * |
| 13973 | + * Or make the subscription callback run inside the zone. |
| 13974 | + * |
| 13975 | + * ``` |
| 13976 | + * constructor(appRef: ApplicationRef, zone: NgZone) { |
| 13977 | + * appRef.isStable.pipe( |
| 13978 | + * first(stable => stable), |
| 13979 | + * switchMap(() => interval(1000)) |
| 13980 | + * ).subscribe(counter => zone.run(() => this.value = counter)); |
| 13981 | + * } |
| 13982 | + * ``` |
| 13983 | + * |
13889 | 13984 | * @publicApi |
13890 | 13985 | */var ApplicationRef=/** @class */function(){/** @internal */function ApplicationRef(_zone,_console,_injector,_exceptionHandler,_componentFactoryResolver,_initStatus){var _this=this;this._zone=_zone;this._console=_console;this._injector=_injector;this._exceptionHandler=_exceptionHandler;this._componentFactoryResolver=_componentFactoryResolver;this._initStatus=_initStatus;this._bootstrapListeners=[];this._views=[];this._runningTick=false;this._enforceNoNewChanges=false;this._stable=true;/** |
13891 | 13986 | * Get a list of component types registered to this application. |
|
0 commit comments