Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@angular/platform-browser-dynamic

Package Overview
Dependencies
Maintainers
1
Versions
851
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@angular/platform-browser-dynamic - npm Package Compare versions

Comparing version 2.0.0-rc.4 to 2.0.0-rc.5

esm/src/platform_providers.d.ts

301

bundles/platform-browser-dynamic.umd.js
/**
* @license Angular 2.0.0-rc.4
* @license Angular v2.0.0-rc.5
* (c) 2010-2016 Google, Inc. https://angular.io/

@@ -12,9 +12,9 @@ * License: MIT

(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/compiler'), require('@angular/core'), require('@angular/platform-browser'), require('rxjs/Subject'), require('rxjs/observable/PromiseObservable'), require('rxjs/operator/toPromise'), require('rxjs/Observable')) :
typeof define === 'function' && define.amd ? define(['exports', '@angular/common', '@angular/compiler', '@angular/core', '@angular/platform-browser', 'rxjs/Subject', 'rxjs/observable/PromiseObservable', 'rxjs/operator/toPromise', 'rxjs/Observable'], factory) :
(factory((global.ng = global.ng || {}, global.ng.platformBrowserDynamic = global.ng.platformBrowserDynamic || {}), global.ng.common, global.ng.compiler, global.ng.core, global.ng.platformBrowser, global.Rx, global.Rx, global.Rx.Observable.prototype, global.Rx));
}(this, function (exports, _angular_common, _angular_compiler, _angular_core, _angular_platformBrowser, rxjs_Subject, rxjs_observable_PromiseObservable, rxjs_operator_toPromise, rxjs_Observable) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/compiler'), require('@angular/core'), require('@angular/platform-browser')) :
typeof define === 'function' && define.amd ? define(['exports', '@angular/compiler', '@angular/core', '@angular/platform-browser'], factory) :
(factory((global.ng = global.ng || {}, global.ng.platformBrowserDynamic = global.ng.platformBrowserDynamic || {}), global.ng.compiler, global.ng.core, global.ng.platformBrowser));
}(this, function (exports, _angular_compiler, _angular_core, _angular_platformBrowser) {
'use strict';
var ReflectionCapabilities = _angular_core.__core_private__.ReflectionCapabilities;
var reflector = _angular_core.__core_private__.reflector;
var Console = _angular_core.__core_private__.Console;
var INTERNAL_BROWSER_PLATFORM_PROVIDERS = _angular_platformBrowser.__platform_browser_private__.INTERNAL_BROWSER_PLATFORM_PROVIDERS;
/**

@@ -58,53 +58,54 @@ * @license

}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var PromiseCompleter = (function () {
function PromiseCompleter() {
var _this = this;
this.promise = new Promise(function (res, rej) {
_this.resolve = res;
_this.reject = rej;
var XHRImpl = (function (_super) {
__extends(XHRImpl, _super);
function XHRImpl() {
_super.apply(this, arguments);
}
XHRImpl.prototype.get = function (url) {
var resolve;
var reject;
var promise = new Promise(function (res, rej) {
resolve = res;
reject = rej;
});
}
return PromiseCompleter;
}());
var PromiseWrapper = (function () {
function PromiseWrapper() {
}
PromiseWrapper.resolve = function (obj) { return Promise.resolve(obj); };
PromiseWrapper.reject = function (obj, _) { return Promise.reject(obj); };
// Note: We can't rename this method into `catch`, as this is not a valid
// method name in Dart.
PromiseWrapper.catchError = function (promise, onError) {
return promise.catch(onError);
};
PromiseWrapper.all = function (promises) {
if (promises.length == 0)
return Promise.resolve([]);
return Promise.all(promises);
};
PromiseWrapper.then = function (promise, success, rejection) {
return promise.then(success, rejection);
};
PromiseWrapper.wrap = function (computation) {
return new Promise(function (res, rej) {
try {
res(computation());
var xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
xhr.responseType = 'text';
xhr.onload = function () {
// responseText is the old-school way of retrieving response (supported by IE8 & 9)
// response/responseType properties were introduced in XHR Level2 spec (supported by IE10)
var response = isPresent(xhr.response) ? xhr.response : xhr.responseText;
// normalize IE9 bug (http://bugs.jquery.com/ticket/1450)
var status = xhr.status === 1223 ? 204 : xhr.status;
// fix status code when it is 0 (0 status is undocumented).
// Occurs when accessing file resources or on Android 4.1 stock browser
// while retrieving files from application cache.
if (status === 0) {
status = response ? 200 : 0;
}
catch (e) {
rej(e);
if (200 <= status && status <= 300) {
resolve(response);
}
});
else {
reject("Failed to load " + url);
}
};
xhr.onerror = function () { reject("Failed to load " + url); };
xhr.send();
return promise;
};
PromiseWrapper.scheduleMicrotask = function (computation) {
PromiseWrapper.then(PromiseWrapper.resolve(null), computation, function (_) { });
};
PromiseWrapper.completer = function () { return new PromiseCompleter(); };
return PromiseWrapper;
}());
return XHRImpl;
}(_angular_compiler.XHR));
/** @nocollapse */
XHRImpl.decorators = [
{ type: _angular_core.Injectable },
];
var INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS = [
INTERNAL_BROWSER_PLATFORM_PROVIDERS,
{
provide: _angular_core.COMPILER_OPTIONS,
useValue: { providers: [{ provide: _angular_compiler.XHR, useClass: XHRImpl }] },
multi: true
},
];
var Map$1 = global$1.Map;

@@ -363,6 +364,6 @@ var Set = global$1.Set;

if (this._cache.hasOwnProperty(url)) {
return PromiseWrapper.resolve(this._cache[url]);
return Promise.resolve(this._cache[url]);
}
else {
return PromiseWrapper.reject('CachedXHR: Did not find cached template for ' + url, null);
return Promise.reject('CachedXHR: Did not find cached template for ' + url);
}

@@ -372,52 +373,7 @@ };

}(_angular_compiler.XHR));
var XHRImpl = (function (_super) {
__extends(XHRImpl, _super);
function XHRImpl() {
_super.apply(this, arguments);
}
XHRImpl.prototype.get = function (url) {
var completer = PromiseWrapper.completer();
var xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
xhr.responseType = 'text';
xhr.onload = function () {
// responseText is the old-school way of retrieving response (supported by IE8 & 9)
// response/responseType properties were introduced in XHR Level2 spec (supported by IE10)
var response = isPresent(xhr.response) ? xhr.response : xhr.responseText;
// normalize IE9 bug (http://bugs.jquery.com/ticket/1450)
var status = xhr.status === 1223 ? 204 : xhr.status;
// fix status code when it is 0 (0 status is undocumented).
// Occurs when accessing file resources or on Android 4.1 stock browser
// while retrieving files from application cache.
if (status === 0) {
status = response ? 200 : 0;
}
if (200 <= status && status <= 300) {
completer.resolve(response);
}
else {
completer.reject("Failed to load " + url, null);
}
};
xhr.onerror = function () { completer.reject("Failed to load " + url, null); };
xhr.send();
return completer.promise;
};
return XHRImpl;
}(_angular_compiler.XHR));
/**
* @experimental
* @deprecated The compiler providers are already included in the {@link CompilerFactory} that is
* contained the {@link browserDynamicPlatform}()`.
*/
var BROWSER_APP_COMPILER_PROVIDERS = [
_angular_compiler.COMPILER_PROVIDERS, {
provide: _angular_compiler.CompilerConfig,
useFactory: function (platformDirectives, platformPipes) {
return new _angular_compiler.CompilerConfig({ platformDirectives: platformDirectives, platformPipes: platformPipes });
},
deps: [_angular_core.PLATFORM_DIRECTIVES, _angular_core.PLATFORM_PIPES]
},
{ provide: _angular_compiler.XHR, useClass: XHRImpl },
{ provide: _angular_core.PLATFORM_DIRECTIVES, useValue: _angular_common.COMMON_DIRECTIVES, multi: true },
{ provide: _angular_core.PLATFORM_PIPES, useValue: _angular_common.COMMON_PIPES, multi: true }
];
var BROWSER_APP_COMPILER_PROVIDERS = [];
/**

@@ -428,2 +384,10 @@ * @experimental

/**
* @experimental API related to bootstrapping are still under review.
*/
var platformBrowserDynamic = _angular_core.createPlatformFactory(_angular_compiler.platformCoreDynamic, 'browserDynamic', INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS);
/**
* @deprecated Use {@link platformBrowserDynamic} instead
*/
var browserDynamicPlatform = platformBrowserDynamic;
/**
* Bootstrapping for Angular applications.

@@ -487,3 +451,3 @@ *

*
* ## API
* ## API (version 1)
*

@@ -495,60 +459,115 @@ * - `appComponentType`: The root component which should act as the application. This is

*
* ## API (version 2)
* - `appComponentType`: The root component which should act as the application. This is
* a reference to a `Type` which is annotated with `@Component(...)`.
* - `providers`, `declarations`, `imports`, `entryComponents`: Defines the properties
* of the dynamically created module that is used to bootstrap the module.
* - to configure the compiler, use the `compilerOptions` parameter.
*
* Returns a `Promise` of {@link ComponentRef}.
*
* @experimental This api cannot be used with the offline compiler and thus is still subject to
* change.
* @deprecated This api cannot be used with the offline compiler. Use
* `PlatformRef.boostrapModule()` instead.
*/
// Note: We are using typescript overloads here to have 2 function signatures!
function bootstrap(appComponentType, customProviders) {
reflector.reflectionCapabilities = new ReflectionCapabilities();
var providers = [
_angular_platformBrowser.BROWSER_APP_PROVIDERS, BROWSER_APP_COMPILER_PROVIDERS,
isPresent(customProviders) ? customProviders : []
var compilerOptions;
var declarations = [];
var entryComponents = [];
var deprecationMessages = [];
var deprecatedConfiguration = _angular_compiler.analyzeAppProvidersForDeprecatedConfiguration(customProviders);
declarations = deprecatedConfiguration.moduleDeclarations.concat(declarations);
compilerOptions = deprecatedConfiguration.compilerOptions;
deprecationMessages = deprecatedConfiguration.deprecationMessages;
var DynamicModule = (function () {
function DynamicModule() {
}
return DynamicModule;
}());
/** @nocollapse */
DynamicModule.decorators = [
{ type: _angular_core.NgModule, args: [{
providers: customProviders,
declarations: declarations.concat([appComponentType]),
imports: [_angular_platformBrowser.BrowserModule],
entryComponents: entryComponents,
bootstrap: [appComponentType],
schemas: [_angular_core.CUSTOM_ELEMENTS_SCHEMA]
},] },
];
var appInjector = _angular_core.ReflectiveInjector.resolveAndCreate(providers, _angular_platformBrowser.browserPlatform().injector);
return _angular_core.coreLoadAndBootstrap(appComponentType, appInjector);
return platformBrowserDynamic()
.bootstrapModule(DynamicModule, compilerOptions)
.then(function (moduleRef) {
var console = moduleRef.injector.get(Console);
deprecationMessages.forEach(function (msg) { return console.warn(msg); });
var appRef = moduleRef.injector.get(_angular_core.ApplicationRef);
return appRef.components[0];
});
}
/**
* Bootstraps the worker ui.
*
* @experimental
*/
function bootstrapWorkerUi(workerScriptUri, customProviders) {
var app = _angular_core.ReflectiveInjector.resolveAndCreate([
_angular_platformBrowser.WORKER_UI_APPLICATION_PROVIDERS, BROWSER_APP_COMPILER_PROVIDERS,
{ provide: _angular_platformBrowser.WORKER_SCRIPT, useValue: workerScriptUri },
isPresent(customProviders) ? customProviders : []
], _angular_platformBrowser.workerUiPlatform().injector);
// Return a promise so that we keep the same semantics as Dart,
// and we might want to wait for the app side to come up
// in the future...
return PromiseWrapper.resolve(app.get(_angular_core.ApplicationRef));
if (customProviders === void 0) { customProviders = []; }
// For now, just creates the worker ui platform...
return Promise.resolve(_angular_platformBrowser.platformWorkerUi([{
provide: _angular_platformBrowser.WORKER_SCRIPT,
useValue: workerScriptUri,
}].concat(customProviders)));
}
/**
* @experimental
* @experimental API related to bootstrapping are still under review.
*/
var WORKER_APP_COMPILER_PROVIDERS = [
_angular_compiler.COMPILER_PROVIDERS, {
provide: _angular_compiler.CompilerConfig,
useFactory: function (platformDirectives, platformPipes) {
return new _angular_compiler.CompilerConfig({ platformDirectives: platformDirectives, platformPipes: platformPipes });
},
deps: [_angular_core.PLATFORM_DIRECTIVES, _angular_core.PLATFORM_PIPES]
},
{ provide: _angular_compiler.XHR, useClass: XHRImpl },
{ provide: _angular_core.PLATFORM_DIRECTIVES, useValue: _angular_common.COMMON_DIRECTIVES, multi: true },
{ provide: _angular_core.PLATFORM_PIPES, useValue: _angular_common.COMMON_PIPES, multi: true }
];
var platformWorkerAppDynamic = _angular_core.createPlatformFactory(_angular_compiler.platformCoreDynamic, 'workerAppDynamic', [{
provide: _angular_core.COMPILER_OPTIONS,
useValue: { providers: [{ provide: _angular_compiler.XHR, useClass: XHRImpl }] },
multi: true
}]);
/**
* @experimental
* @deprecated Use {@link platformWorkerAppDynamic} instead
*/
var workerAppDynamicPlatform = platformWorkerAppDynamic;
/**
* @deprecated Create an {@link NgModule} that includes the {@link WorkerAppModule} and use {@link
* bootstrapModule}
* with the {@link workerAppDynamicPlatform}() instead.
*/
function bootstrapWorkerApp(appComponentType, customProviders) {
var appInjector = _angular_core.ReflectiveInjector.resolveAndCreate([
_angular_platformBrowser.WORKER_APP_APPLICATION_PROVIDERS, WORKER_APP_COMPILER_PROVIDERS,
isPresent(customProviders) ? customProviders : []
], _angular_platformBrowser.workerAppPlatform().injector);
return _angular_core.coreLoadAndBootstrap(appComponentType, appInjector);
console.warn('bootstrapWorkerApp is deprecated. Create an @NgModule that includes the `WorkerAppModule` and use `bootstrapModule` with the `workerAppDynamicPlatform()` instead.');
var deprecatedConfiguration = _angular_compiler.analyzeAppProvidersForDeprecatedConfiguration(customProviders);
var declarations = [deprecatedConfiguration.moduleDeclarations.concat([appComponentType])];
var DynamicModule = (function () {
function DynamicModule() {
}
return DynamicModule;
}());
/** @nocollapse */
DynamicModule.decorators = [
{ type: _angular_core.NgModule, args: [{
providers: customProviders,
declarations: declarations,
imports: [_angular_platformBrowser.WorkerAppModule],
bootstrap: [appComponentType]
},] },
];
return platformWorkerAppDynamic()
.bootstrapModule(DynamicModule, deprecatedConfiguration.compilerOptions)
.then(function (moduleRef) {
var console = moduleRef.injector.get(Console);
deprecatedConfiguration.deprecationMessages.forEach(function (msg) { return console.warn(msg); });
var appRef = moduleRef.injector.get(_angular_core.ApplicationRef);
return appRef.components[0];
});
}
exports.BROWSER_APP_COMPILER_PROVIDERS = BROWSER_APP_COMPILER_PROVIDERS;
exports.CACHED_TEMPLATE_PROVIDER = CACHED_TEMPLATE_PROVIDER;
exports.platformBrowserDynamic = platformBrowserDynamic;
exports.browserDynamicPlatform = browserDynamicPlatform;
exports.bootstrap = bootstrap;
exports.bootstrapWorkerUi = bootstrapWorkerUi;
exports.platformWorkerAppDynamic = platformWorkerAppDynamic;
exports.workerAppDynamicPlatform = workerAppDynamicPlatform;
exports.bootstrapWorkerApp = bootstrapWorkerApp;
}));

@@ -1,1 +0,6 @@

var __extends=this&&this.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)};!function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?factory(exports,require("@angular/common"),require("@angular/compiler"),require("@angular/core"),require("@angular/platform-browser"),require("rxjs/Subject"),require("rxjs/observable/PromiseObservable"),require("rxjs/operator/toPromise"),require("rxjs/Observable")):"function"==typeof define&&define.amd?define(["exports","@angular/common","@angular/compiler","@angular/core","@angular/platform-browser","rxjs/Subject","rxjs/observable/PromiseObservable","rxjs/operator/toPromise","rxjs/Observable"],factory):factory((global.ng=global.ng||{},global.ng.platformBrowserDynamic=global.ng.platformBrowserDynamic||{}),global.ng.common,global.ng.compiler,global.ng.core,global.ng.platformBrowser,global.Rx,global.Rx,global.Rx.Observable.prototype,global.Rx)}(this,function(exports,_angular_common,_angular_compiler,_angular_core,_angular_platformBrowser,rxjs_Subject,rxjs_observable_PromiseObservable,rxjs_operator_toPromise,rxjs_Observable){"use strict";function isPresent(obj){return void 0!==obj&&null!==obj}function isBlank(obj){return void 0===obj||null===obj}function isArray(obj){return Array.isArray(obj)}function _flattenArray(source,target){if(isPresent(source))for(var i=0;i<source.length;i++){var item=source[i];isArray(item)?_flattenArray(item,target):target.push(item)}return target}function bootstrap(appComponentType,customProviders){reflector.reflectionCapabilities=new ReflectionCapabilities;var providers=[_angular_platformBrowser.BROWSER_APP_PROVIDERS,BROWSER_APP_COMPILER_PROVIDERS,isPresent(customProviders)?customProviders:[]],appInjector=_angular_core.ReflectiveInjector.resolveAndCreate(providers,_angular_platformBrowser.browserPlatform().injector);return _angular_core.coreLoadAndBootstrap(appComponentType,appInjector)}function bootstrapWorkerUi(workerScriptUri,customProviders){var app=_angular_core.ReflectiveInjector.resolveAndCreate([_angular_platformBrowser.WORKER_UI_APPLICATION_PROVIDERS,BROWSER_APP_COMPILER_PROVIDERS,{provide:_angular_platformBrowser.WORKER_SCRIPT,useValue:workerScriptUri},isPresent(customProviders)?customProviders:[]],_angular_platformBrowser.workerUiPlatform().injector);return PromiseWrapper.resolve(app.get(_angular_core.ApplicationRef))}function bootstrapWorkerApp(appComponentType,customProviders){var appInjector=_angular_core.ReflectiveInjector.resolveAndCreate([_angular_platformBrowser.WORKER_APP_APPLICATION_PROVIDERS,WORKER_APP_COMPILER_PROVIDERS,isPresent(customProviders)?customProviders:[]],_angular_platformBrowser.workerAppPlatform().injector);return _angular_core.coreLoadAndBootstrap(appComponentType,appInjector)}var globalScope,ReflectionCapabilities=_angular_core.__core_private__.ReflectionCapabilities,reflector=_angular_core.__core_private__.reflector;globalScope="undefined"==typeof window?"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:global:window;var global$1=globalScope;global$1.assert=function(condition){};var PromiseCompleter=function(){function PromiseCompleter(){var _this=this;this.promise=new Promise(function(res,rej){_this.resolve=res,_this.reject=rej})}return PromiseCompleter}(),PromiseWrapper=function(){function PromiseWrapper(){}return PromiseWrapper.resolve=function(obj){return Promise.resolve(obj)},PromiseWrapper.reject=function(obj,_){return Promise.reject(obj)},PromiseWrapper.catchError=function(promise,onError){return promise.catch(onError)},PromiseWrapper.all=function(promises){return 0==promises.length?Promise.resolve([]):Promise.all(promises)},PromiseWrapper.then=function(promise,success,rejection){return promise.then(success,rejection)},PromiseWrapper.wrap=function(computation){return new Promise(function(res,rej){try{res(computation())}catch(e){rej(e)}})},PromiseWrapper.scheduleMicrotask=function(computation){PromiseWrapper.then(PromiseWrapper.resolve(null),computation,function(_){})},PromiseWrapper.completer=function(){return new PromiseCompleter},PromiseWrapper}(),Map$1=global$1.Map,Set=global$1.Set,ListWrapper=(function(){try{if(1===new Map$1([[1,2]]).size)return function(pairs){return new Map$1(pairs)}}catch(e){}return function(pairs){for(var map=new Map$1,i=0;i<pairs.length;i++){var pair=pairs[i];map.set(pair[0],pair[1])}return map}}(),function(){try{if(new Map$1(new Map$1))return function(m){return new Map$1(m)}}catch(e){}return function(m){var map=new Map$1;return m.forEach(function(v,k){map.set(k,v)}),map}}(),function(){return(new Map$1).keys().next?function(m){for(var k,keyIterator=m.keys();!(k=keyIterator.next()).done;)m.set(k.value,null)}:function(m){m.forEach(function(v,k){m.set(k,null)})}}(),function(){try{if((new Map$1).values().next)return function(m,getValues){return getValues?Array.from(m.values()):Array.from(m.keys())}}catch(e){}return function(m,getValues){var res=ListWrapper.createFixedSize(m.size),i=0;return m.forEach(function(v,k){res[i]=getValues?v:k,i++}),res}}(),function(){function ListWrapper(){}return ListWrapper.createFixedSize=function(size){return new Array(size)},ListWrapper.createGrowableSize=function(size){return new Array(size)},ListWrapper.clone=function(array){return array.slice(0)},ListWrapper.forEachWithIndex=function(array,fn){for(var i=0;i<array.length;i++)fn(array[i],i)},ListWrapper.first=function(array){return array?array[0]:null},ListWrapper.last=function(array){return array&&0!=array.length?array[array.length-1]:null},ListWrapper.indexOf=function(array,value,startIndex){return void 0===startIndex&&(startIndex=0),array.indexOf(value,startIndex)},ListWrapper.contains=function(list,el){return list.indexOf(el)!==-1},ListWrapper.reversed=function(array){var a=ListWrapper.clone(array);return a.reverse()},ListWrapper.concat=function(a,b){return a.concat(b)},ListWrapper.insert=function(list,index,value){list.splice(index,0,value)},ListWrapper.removeAt=function(list,index){var res=list[index];return list.splice(index,1),res},ListWrapper.removeAll=function(list,items){for(var i=0;i<items.length;++i){var index=list.indexOf(items[i]);list.splice(index,1)}},ListWrapper.remove=function(list,el){var index=list.indexOf(el);return index>-1&&(list.splice(index,1),!0)},ListWrapper.clear=function(list){list.length=0},ListWrapper.isEmpty=function(list){return 0==list.length},ListWrapper.fill=function(list,value,start,end){void 0===start&&(start=0),void 0===end&&(end=null),list.fill(value,start,null===end?list.length:end)},ListWrapper.equals=function(a,b){if(a.length!=b.length)return!1;for(var i=0;i<a.length;++i)if(a[i]!==b[i])return!1;return!0},ListWrapper.slice=function(l,from,to){return void 0===from&&(from=0),void 0===to&&(to=null),l.slice(from,null===to?void 0:to)},ListWrapper.splice=function(l,from,length){return l.splice(from,length)},ListWrapper.sort=function(l,compareFn){isPresent(compareFn)?l.sort(compareFn):l.sort()},ListWrapper.toString=function(l){return l.toString()},ListWrapper.toJSON=function(l){return JSON.stringify(l)},ListWrapper.maximum=function(list,predicate){if(0==list.length)return null;for(var solution=null,maxValue=-(1/0),index=0;index<list.length;index++){var candidate=list[index];if(!isBlank(candidate)){var candidateValue=predicate(candidate);candidateValue>maxValue&&(solution=candidate,maxValue=candidateValue)}}return solution},ListWrapper.flatten=function(list){var target=[];return _flattenArray(list,target),target},ListWrapper.addAll=function(list,source){for(var i=0;i<source.length;i++)list.push(source[i])},ListWrapper}()),BaseException=(function(){var test=new Set([1,2,3]);return 3===test.size?function(lst){return new Set(lst)}:function(lst){var res=new Set(lst);if(res.size!==lst.length)for(var i=0;i<lst.length;i++)res.add(lst[i]);return res}}(),function(_super){function BaseException(message){void 0===message&&(message="--"),_super.call(this,message),this.message=message,this.stack=new Error(message).stack}return __extends(BaseException,_super),BaseException.prototype.toString=function(){return this.message},BaseException}(Error)),CachedXHR=function(_super){function CachedXHR(){if(_super.call(this),this._cache=global$1.$templateCache,null==this._cache)throw new BaseException("CachedXHR: Template cache was not found in $templateCache.")}return __extends(CachedXHR,_super),CachedXHR.prototype.get=function(url){return this._cache.hasOwnProperty(url)?PromiseWrapper.resolve(this._cache[url]):PromiseWrapper.reject("CachedXHR: Did not find cached template for "+url,null)},CachedXHR}(_angular_compiler.XHR),XHRImpl=function(_super){function XHRImpl(){_super.apply(this,arguments)}return __extends(XHRImpl,_super),XHRImpl.prototype.get=function(url){var completer=PromiseWrapper.completer(),xhr=new XMLHttpRequest;return xhr.open("GET",url,!0),xhr.responseType="text",xhr.onload=function(){var response=isPresent(xhr.response)?xhr.response:xhr.responseText,status=1223===xhr.status?204:xhr.status;0===status&&(status=response?200:0),200<=status&&status<=300?completer.resolve(response):completer.reject("Failed to load "+url,null)},xhr.onerror=function(){completer.reject("Failed to load "+url,null)},xhr.send(),completer.promise},XHRImpl}(_angular_compiler.XHR),BROWSER_APP_COMPILER_PROVIDERS=[_angular_compiler.COMPILER_PROVIDERS,{provide:_angular_compiler.CompilerConfig,useFactory:function(platformDirectives,platformPipes){return new _angular_compiler.CompilerConfig({platformDirectives:platformDirectives,platformPipes:platformPipes})},deps:[_angular_core.PLATFORM_DIRECTIVES,_angular_core.PLATFORM_PIPES]},{provide:_angular_compiler.XHR,useClass:XHRImpl},{provide:_angular_core.PLATFORM_DIRECTIVES,useValue:_angular_common.COMMON_DIRECTIVES,multi:!0},{provide:_angular_core.PLATFORM_PIPES,useValue:_angular_common.COMMON_PIPES,multi:!0}],CACHED_TEMPLATE_PROVIDER=[{provide:_angular_compiler.XHR,useClass:CachedXHR}],WORKER_APP_COMPILER_PROVIDERS=[_angular_compiler.COMPILER_PROVIDERS,{provide:_angular_compiler.CompilerConfig,useFactory:function(platformDirectives,platformPipes){return new _angular_compiler.CompilerConfig({platformDirectives:platformDirectives,platformPipes:platformPipes})},deps:[_angular_core.PLATFORM_DIRECTIVES,_angular_core.PLATFORM_PIPES]},{provide:_angular_compiler.XHR,useClass:XHRImpl},{provide:_angular_core.PLATFORM_DIRECTIVES,useValue:_angular_common.COMMON_DIRECTIVES,multi:!0},{provide:_angular_core.PLATFORM_PIPES,useValue:_angular_common.COMMON_PIPES,multi:!0}];exports.BROWSER_APP_COMPILER_PROVIDERS=BROWSER_APP_COMPILER_PROVIDERS,exports.CACHED_TEMPLATE_PROVIDER=CACHED_TEMPLATE_PROVIDER,exports.bootstrap=bootstrap,exports.bootstrapWorkerUi=bootstrapWorkerUi,exports.bootstrapWorkerApp=bootstrapWorkerApp});
/**
* @license Angular v2.0.0-rc.5
* (c) 2010-2016 Google, Inc. https://angular.io/
* License: MIT
*/
var __extends=this&&this.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)};!function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?factory(exports,require("@angular/compiler"),require("@angular/core"),require("@angular/platform-browser")):"function"==typeof define&&define.amd?define(["exports","@angular/compiler","@angular/core","@angular/platform-browser"],factory):factory((global.ng=global.ng||{},global.ng.platformBrowserDynamic=global.ng.platformBrowserDynamic||{}),global.ng.compiler,global.ng.core,global.ng.platformBrowser)}(this,function(exports,_angular_compiler,_angular_core,_angular_platformBrowser){"use strict";function isPresent(obj){return void 0!==obj&&null!==obj}function isBlank(obj){return void 0===obj||null===obj}function isArray(obj){return Array.isArray(obj)}function _flattenArray(source,target){if(isPresent(source))for(var i=0;i<source.length;i++){var item=source[i];isArray(item)?_flattenArray(item,target):target.push(item)}return target}function bootstrap(appComponentType,customProviders){var compilerOptions,declarations=[],entryComponents=[],deprecationMessages=[],deprecatedConfiguration=_angular_compiler.analyzeAppProvidersForDeprecatedConfiguration(customProviders);declarations=deprecatedConfiguration.moduleDeclarations.concat(declarations),compilerOptions=deprecatedConfiguration.compilerOptions,deprecationMessages=deprecatedConfiguration.deprecationMessages;var DynamicModule=function(){function DynamicModule(){}return DynamicModule}();return DynamicModule.decorators=[{type:_angular_core.NgModule,args:[{providers:customProviders,declarations:declarations.concat([appComponentType]),imports:[_angular_platformBrowser.BrowserModule],entryComponents:entryComponents,bootstrap:[appComponentType],schemas:[_angular_core.CUSTOM_ELEMENTS_SCHEMA]}]}],platformBrowserDynamic().bootstrapModule(DynamicModule,compilerOptions).then(function(moduleRef){var console=moduleRef.injector.get(Console);deprecationMessages.forEach(function(msg){return console.warn(msg)});var appRef=moduleRef.injector.get(_angular_core.ApplicationRef);return appRef.components[0]})}function bootstrapWorkerUi(workerScriptUri,customProviders){return void 0===customProviders&&(customProviders=[]),Promise.resolve(_angular_platformBrowser.platformWorkerUi([{provide:_angular_platformBrowser.WORKER_SCRIPT,useValue:workerScriptUri}].concat(customProviders)))}function bootstrapWorkerApp(appComponentType,customProviders){console.warn("bootstrapWorkerApp is deprecated. Create an @NgModule that includes the `WorkerAppModule` and use `bootstrapModule` with the `workerAppDynamicPlatform()` instead.");var deprecatedConfiguration=_angular_compiler.analyzeAppProvidersForDeprecatedConfiguration(customProviders),declarations=[deprecatedConfiguration.moduleDeclarations.concat([appComponentType])],DynamicModule=function(){function DynamicModule(){}return DynamicModule}();return DynamicModule.decorators=[{type:_angular_core.NgModule,args:[{providers:customProviders,declarations:declarations,imports:[_angular_platformBrowser.WorkerAppModule],bootstrap:[appComponentType]}]}],platformWorkerAppDynamic().bootstrapModule(DynamicModule,deprecatedConfiguration.compilerOptions).then(function(moduleRef){var console=moduleRef.injector.get(Console);deprecatedConfiguration.deprecationMessages.forEach(function(msg){return console.warn(msg)});var appRef=moduleRef.injector.get(_angular_core.ApplicationRef);return appRef.components[0]})}var globalScope,Console=_angular_core.__core_private__.Console,INTERNAL_BROWSER_PLATFORM_PROVIDERS=_angular_platformBrowser.__platform_browser_private__.INTERNAL_BROWSER_PLATFORM_PROVIDERS;globalScope="undefined"==typeof window?"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:global:window;var global$1=globalScope;global$1.assert=function(condition){};var XHRImpl=function(_super){function XHRImpl(){_super.apply(this,arguments)}return __extends(XHRImpl,_super),XHRImpl.prototype.get=function(url){var resolve,reject,promise=new Promise(function(res,rej){resolve=res,reject=rej}),xhr=new XMLHttpRequest;return xhr.open("GET",url,!0),xhr.responseType="text",xhr.onload=function(){var response=isPresent(xhr.response)?xhr.response:xhr.responseText,status=1223===xhr.status?204:xhr.status;0===status&&(status=response?200:0),200<=status&&status<=300?resolve(response):reject("Failed to load "+url)},xhr.onerror=function(){reject("Failed to load "+url)},xhr.send(),promise},XHRImpl}(_angular_compiler.XHR);XHRImpl.decorators=[{type:_angular_core.Injectable}];var INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS=[INTERNAL_BROWSER_PLATFORM_PROVIDERS,{provide:_angular_core.COMPILER_OPTIONS,useValue:{providers:[{provide:_angular_compiler.XHR,useClass:XHRImpl}]},multi:!0}],Map$1=global$1.Map,Set=global$1.Set,ListWrapper=(function(){try{if(1===new Map$1([[1,2]]).size)return function(pairs){return new Map$1(pairs)}}catch(e){}return function(pairs){for(var map=new Map$1,i=0;i<pairs.length;i++){var pair=pairs[i];map.set(pair[0],pair[1])}return map}}(),function(){try{if(new Map$1(new Map$1))return function(m){return new Map$1(m)}}catch(e){}return function(m){var map=new Map$1;return m.forEach(function(v,k){map.set(k,v)}),map}}(),function(){return(new Map$1).keys().next?function(m){for(var k,keyIterator=m.keys();!(k=keyIterator.next()).done;)m.set(k.value,null)}:function(m){m.forEach(function(v,k){m.set(k,null)})}}(),function(){try{if((new Map$1).values().next)return function(m,getValues){return getValues?Array.from(m.values()):Array.from(m.keys())}}catch(e){}return function(m,getValues){var res=ListWrapper.createFixedSize(m.size),i=0;return m.forEach(function(v,k){res[i]=getValues?v:k,i++}),res}}(),function(){function ListWrapper(){}return ListWrapper.createFixedSize=function(size){return new Array(size)},ListWrapper.createGrowableSize=function(size){return new Array(size)},ListWrapper.clone=function(array){return array.slice(0)},ListWrapper.forEachWithIndex=function(array,fn){for(var i=0;i<array.length;i++)fn(array[i],i)},ListWrapper.first=function(array){return array?array[0]:null},ListWrapper.last=function(array){return array&&0!=array.length?array[array.length-1]:null},ListWrapper.indexOf=function(array,value,startIndex){return void 0===startIndex&&(startIndex=0),array.indexOf(value,startIndex)},ListWrapper.contains=function(list,el){return list.indexOf(el)!==-1},ListWrapper.reversed=function(array){var a=ListWrapper.clone(array);return a.reverse()},ListWrapper.concat=function(a,b){return a.concat(b)},ListWrapper.insert=function(list,index,value){list.splice(index,0,value)},ListWrapper.removeAt=function(list,index){var res=list[index];return list.splice(index,1),res},ListWrapper.removeAll=function(list,items){for(var i=0;i<items.length;++i){var index=list.indexOf(items[i]);list.splice(index,1)}},ListWrapper.remove=function(list,el){var index=list.indexOf(el);return index>-1&&(list.splice(index,1),!0)},ListWrapper.clear=function(list){list.length=0},ListWrapper.isEmpty=function(list){return 0==list.length},ListWrapper.fill=function(list,value,start,end){void 0===start&&(start=0),void 0===end&&(end=null),list.fill(value,start,null===end?list.length:end)},ListWrapper.equals=function(a,b){if(a.length!=b.length)return!1;for(var i=0;i<a.length;++i)if(a[i]!==b[i])return!1;return!0},ListWrapper.slice=function(l,from,to){return void 0===from&&(from=0),void 0===to&&(to=null),l.slice(from,null===to?void 0:to)},ListWrapper.splice=function(l,from,length){return l.splice(from,length)},ListWrapper.sort=function(l,compareFn){isPresent(compareFn)?l.sort(compareFn):l.sort()},ListWrapper.toString=function(l){return l.toString()},ListWrapper.toJSON=function(l){return JSON.stringify(l)},ListWrapper.maximum=function(list,predicate){if(0==list.length)return null;for(var solution=null,maxValue=-(1/0),index=0;index<list.length;index++){var candidate=list[index];if(!isBlank(candidate)){var candidateValue=predicate(candidate);candidateValue>maxValue&&(solution=candidate,maxValue=candidateValue)}}return solution},ListWrapper.flatten=function(list){var target=[];return _flattenArray(list,target),target},ListWrapper.addAll=function(list,source){for(var i=0;i<source.length;i++)list.push(source[i])},ListWrapper}()),BaseException=(function(){var test=new Set([1,2,3]);return 3===test.size?function(lst){return new Set(lst)}:function(lst){var res=new Set(lst);if(res.size!==lst.length)for(var i=0;i<lst.length;i++)res.add(lst[i]);return res}}(),function(_super){function BaseException(message){void 0===message&&(message="--"),_super.call(this,message),this.message=message,this.stack=new Error(message).stack}return __extends(BaseException,_super),BaseException.prototype.toString=function(){return this.message},BaseException}(Error)),CachedXHR=function(_super){function CachedXHR(){if(_super.call(this),this._cache=global$1.$templateCache,null==this._cache)throw new BaseException("CachedXHR: Template cache was not found in $templateCache.")}return __extends(CachedXHR,_super),CachedXHR.prototype.get=function(url){return this._cache.hasOwnProperty(url)?Promise.resolve(this._cache[url]):Promise.reject("CachedXHR: Did not find cached template for "+url)},CachedXHR}(_angular_compiler.XHR),BROWSER_APP_COMPILER_PROVIDERS=[],CACHED_TEMPLATE_PROVIDER=[{provide:_angular_compiler.XHR,useClass:CachedXHR}],platformBrowserDynamic=_angular_core.createPlatformFactory(_angular_compiler.platformCoreDynamic,"browserDynamic",INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS),browserDynamicPlatform=platformBrowserDynamic,platformWorkerAppDynamic=_angular_core.createPlatformFactory(_angular_compiler.platformCoreDynamic,"workerAppDynamic",[{provide:_angular_core.COMPILER_OPTIONS,useValue:{providers:[{provide:_angular_compiler.XHR,useClass:XHRImpl}]},multi:!0}]),workerAppDynamicPlatform=platformWorkerAppDynamic;exports.BROWSER_APP_COMPILER_PROVIDERS=BROWSER_APP_COMPILER_PROVIDERS,exports.CACHED_TEMPLATE_PROVIDER=CACHED_TEMPLATE_PROVIDER,exports.platformBrowserDynamic=platformBrowserDynamic,exports.browserDynamicPlatform=browserDynamicPlatform,exports.bootstrap=bootstrap,exports.bootstrapWorkerUi=bootstrapWorkerUi,exports.platformWorkerAppDynamic=platformWorkerAppDynamic,exports.workerAppDynamicPlatform=workerAppDynamicPlatform,exports.bootstrapWorkerApp=bootstrapWorkerApp});

@@ -11,1 +11,2 @@ /**

export declare var reflector: typeof t.reflector;
export declare var Console: typeof t.Console;

@@ -12,2 +12,3 @@ /**

exports.reflector = core_1.__core_private__.reflector;
exports.Console = core_1.__core_private__.Console;
//# sourceMappingURL=core_private.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"ReflectionCapabilities":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"___core_private__"},"member":"ReflectionCapabilities"},"reflector":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"___core_private__"},"member":"reflector"}}}
{"__symbolic":"module","version":1,"metadata":{"ReflectionCapabilities":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"___core_private__"},"member":"ReflectionCapabilities"},"reflector":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"___core_private__"},"member":"reflector"},"Console":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"___core_private__"},"member":"Console"}}}

@@ -11,1 +11,2 @@ /**

export declare var reflector: typeof t.reflector;
export declare var Console: typeof t.Console;

@@ -11,2 +11,3 @@ /**

export var reflector = r.reflector;
export var Console = r.Console;
//# sourceMappingURL=core_private.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"ReflectionCapabilities":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"___core_private__"},"member":"ReflectionCapabilities"},"reflector":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"___core_private__"},"member":"reflector"}}}
{"__symbolic":"module","version":1,"metadata":{"ReflectionCapabilities":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"___core_private__"},"member":"ReflectionCapabilities"},"reflector":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"___core_private__"},"member":"reflector"},"Console":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"___core_private__"},"member":"Console"}}}

@@ -1,4 +0,6 @@

import { ApplicationRef, ComponentRef, Type } from '@angular/core';
import { ComponentRef, PlatformRef } from '@angular/core';
import { ConcreteType } from './src/facade/lang';
/**
* @experimental
* @deprecated The compiler providers are already included in the {@link CompilerFactory} that is
* contained the {@link browserDynamicPlatform}()`.
*/

@@ -11,2 +13,10 @@ export declare const BROWSER_APP_COMPILER_PROVIDERS: Array<any>;

/**
* @experimental API related to bootstrapping are still under review.
*/
export declare const platformBrowserDynamic: (extraProviders?: any[]) => PlatformRef;
/**
* @deprecated Use {@link platformBrowserDynamic} instead
*/
export declare const browserDynamicPlatform: (extraProviders?: any[]) => PlatformRef;
/**
* Bootstrapping for Angular applications.

@@ -70,3 +80,3 @@ *

*
* ## API
* ## API (version 1)
*

@@ -78,15 +88,34 @@ * - `appComponentType`: The root component which should act as the application. This is

*
* ## API (version 2)
* - `appComponentType`: The root component which should act as the application. This is
* a reference to a `Type` which is annotated with `@Component(...)`.
* - `providers`, `declarations`, `imports`, `entryComponents`: Defines the properties
* of the dynamically created module that is used to bootstrap the module.
* - to configure the compiler, use the `compilerOptions` parameter.
*
* Returns a `Promise` of {@link ComponentRef}.
*
* @experimental This api cannot be used with the offline compiler and thus is still subject to
* change.
* @deprecated This api cannot be used with the offline compiler. Use
* `PlatformRef.boostrapModule()` instead.
*/
export declare function bootstrap(appComponentType: Type, customProviders?: Array<any>): Promise<ComponentRef<any>>;
export declare function bootstrap<C>(appComponentType: ConcreteType<C>, customProviders?: Array<any>): Promise<ComponentRef<C>>;
/**
* Bootstraps the worker ui.
*
* @experimental
*/
export declare function bootstrapWorkerUi(workerScriptUri: string, customProviders?: Array<any>): Promise<ApplicationRef>;
export declare function bootstrapWorkerUi(workerScriptUri: string, customProviders?: Array<any>): Promise<PlatformRef>;
/**
* @experimental
* @experimental API related to bootstrapping are still under review.
*/
export declare function bootstrapWorkerApp(appComponentType: Type, customProviders?: Array<any>): Promise<ComponentRef<any>>;
export declare const platformWorkerAppDynamic: (extraProviders?: any[]) => PlatformRef;
/**
* @deprecated Use {@link platformWorkerAppDynamic} instead
*/
export declare const workerAppDynamicPlatform: (extraProviders?: any[]) => PlatformRef;
/**
* @deprecated Create an {@link NgModule} that includes the {@link WorkerAppModule} and use {@link
* bootstrapModule}
* with the {@link workerAppDynamicPlatform}() instead.
*/
export declare function bootstrapWorkerApp<T>(appComponentType: ConcreteType<T>, customProviders?: Array<any>): Promise<ComponentRef<T>>;

@@ -8,26 +8,14 @@ /**

*/
import { COMMON_DIRECTIVES, COMMON_PIPES } from '@angular/common';
import { COMPILER_PROVIDERS, CompilerConfig, XHR } from '@angular/compiler';
import { ApplicationRef, PLATFORM_DIRECTIVES, PLATFORM_PIPES, ReflectiveInjector, coreLoadAndBootstrap } from '@angular/core';
import { BROWSER_APP_PROVIDERS, WORKER_APP_APPLICATION_PROVIDERS, WORKER_SCRIPT, WORKER_UI_APPLICATION_PROVIDERS, browserPlatform, workerAppPlatform, workerUiPlatform } from '@angular/platform-browser';
import { ReflectionCapabilities, reflector } from './core_private';
import { PromiseWrapper } from './src/facade/async';
import { isPresent } from './src/facade/lang';
import { XHR, analyzeAppProvidersForDeprecatedConfiguration, platformCoreDynamic } from '@angular/compiler';
import { ApplicationRef, COMPILER_OPTIONS, CUSTOM_ELEMENTS_SCHEMA, NgModule, createPlatformFactory } from '@angular/core';
import { BrowserModule, WORKER_SCRIPT, WorkerAppModule, platformWorkerUi } from '@angular/platform-browser';
import { Console } from './core_private';
import { INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS } from './src/platform_providers';
import { CachedXHR } from './src/xhr/xhr_cache';
import { XHRImpl } from './src/xhr/xhr_impl';
/**
* @experimental
* @deprecated The compiler providers are already included in the {@link CompilerFactory} that is
* contained the {@link browserDynamicPlatform}()`.
*/
export const BROWSER_APP_COMPILER_PROVIDERS = [
COMPILER_PROVIDERS, {
provide: CompilerConfig,
useFactory: (platformDirectives, platformPipes) => {
return new CompilerConfig({ platformDirectives, platformPipes });
},
deps: [PLATFORM_DIRECTIVES, PLATFORM_PIPES]
},
{ provide: XHR, useClass: XHRImpl },
{ provide: PLATFORM_DIRECTIVES, useValue: COMMON_DIRECTIVES, multi: true },
{ provide: PLATFORM_PIPES, useValue: COMMON_PIPES, multi: true }
];
export const BROWSER_APP_COMPILER_PROVIDERS = [];
/**

@@ -38,2 +26,10 @@ * @experimental

/**
* @experimental API related to bootstrapping are still under review.
*/
export const platformBrowserDynamic = createPlatformFactory(platformCoreDynamic, 'browserDynamic', INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS);
/**
* @deprecated Use {@link platformBrowserDynamic} instead
*/
export const browserDynamicPlatform = platformBrowserDynamic;
/**
* Bootstrapping for Angular applications.

@@ -97,3 +93,3 @@ *

*
* ## API
* ## API (version 1)
*

@@ -105,55 +101,102 @@ * - `appComponentType`: The root component which should act as the application. This is

*
* ## API (version 2)
* - `appComponentType`: The root component which should act as the application. This is
* a reference to a `Type` which is annotated with `@Component(...)`.
* - `providers`, `declarations`, `imports`, `entryComponents`: Defines the properties
* of the dynamically created module that is used to bootstrap the module.
* - to configure the compiler, use the `compilerOptions` parameter.
*
* Returns a `Promise` of {@link ComponentRef}.
*
* @experimental This api cannot be used with the offline compiler and thus is still subject to
* change.
* @deprecated This api cannot be used with the offline compiler. Use
* `PlatformRef.boostrapModule()` instead.
*/
// Note: We are using typescript overloads here to have 2 function signatures!
export function bootstrap(appComponentType, customProviders) {
reflector.reflectionCapabilities = new ReflectionCapabilities();
let providers = [
BROWSER_APP_PROVIDERS, BROWSER_APP_COMPILER_PROVIDERS,
isPresent(customProviders) ? customProviders : []
let compilerOptions;
let declarations = [];
let entryComponents = [];
let deprecationMessages = [];
const deprecatedConfiguration = analyzeAppProvidersForDeprecatedConfiguration(customProviders);
declarations = deprecatedConfiguration.moduleDeclarations.concat(declarations);
compilerOptions = deprecatedConfiguration.compilerOptions;
deprecationMessages = deprecatedConfiguration.deprecationMessages;
class DynamicModule {
}
/** @nocollapse */
DynamicModule.decorators = [
{ type: NgModule, args: [{
providers: customProviders,
declarations: declarations.concat([appComponentType]),
imports: [BrowserModule],
entryComponents: entryComponents,
bootstrap: [appComponentType],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
},] },
];
var appInjector = ReflectiveInjector.resolveAndCreate(providers, browserPlatform().injector);
return coreLoadAndBootstrap(appComponentType, appInjector);
return platformBrowserDynamic()
.bootstrapModule(DynamicModule, compilerOptions)
.then((moduleRef) => {
const console = moduleRef.injector.get(Console);
deprecationMessages.forEach((msg) => console.warn(msg));
const appRef = moduleRef.injector.get(ApplicationRef);
return appRef.components[0];
});
}
/**
* Bootstraps the worker ui.
*
* @experimental
*/
export function bootstrapWorkerUi(workerScriptUri, customProviders) {
var app = ReflectiveInjector.resolveAndCreate([
WORKER_UI_APPLICATION_PROVIDERS, BROWSER_APP_COMPILER_PROVIDERS,
{ provide: WORKER_SCRIPT, useValue: workerScriptUri },
isPresent(customProviders) ? customProviders : []
], workerUiPlatform().injector);
// Return a promise so that we keep the same semantics as Dart,
// and we might want to wait for the app side to come up
// in the future...
return PromiseWrapper.resolve(app.get(ApplicationRef));
export function bootstrapWorkerUi(workerScriptUri, customProviders = []) {
// For now, just creates the worker ui platform...
return Promise.resolve(platformWorkerUi([{
provide: WORKER_SCRIPT,
useValue: workerScriptUri,
}].concat(customProviders)));
}
/**
* @experimental
* @experimental API related to bootstrapping are still under review.
*/
const WORKER_APP_COMPILER_PROVIDERS = [
COMPILER_PROVIDERS, {
provide: CompilerConfig,
useFactory: (platformDirectives, platformPipes) => {
return new CompilerConfig({ platformDirectives, platformPipes });
},
deps: [PLATFORM_DIRECTIVES, PLATFORM_PIPES]
},
{ provide: XHR, useClass: XHRImpl },
{ provide: PLATFORM_DIRECTIVES, useValue: COMMON_DIRECTIVES, multi: true },
{ provide: PLATFORM_PIPES, useValue: COMMON_PIPES, multi: true }
];
export const platformWorkerAppDynamic = createPlatformFactory(platformCoreDynamic, 'workerAppDynamic', [{
provide: COMPILER_OPTIONS,
useValue: { providers: [{ provide: XHR, useClass: XHRImpl }] },
multi: true
}]);
/**
* @experimental
* @deprecated Use {@link platformWorkerAppDynamic} instead
*/
export const workerAppDynamicPlatform = platformWorkerAppDynamic;
/**
* @deprecated Create an {@link NgModule} that includes the {@link WorkerAppModule} and use {@link
* bootstrapModule}
* with the {@link workerAppDynamicPlatform}() instead.
*/
export function bootstrapWorkerApp(appComponentType, customProviders) {
var appInjector = ReflectiveInjector.resolveAndCreate([
WORKER_APP_APPLICATION_PROVIDERS, WORKER_APP_COMPILER_PROVIDERS,
isPresent(customProviders) ? customProviders : []
], workerAppPlatform().injector);
return coreLoadAndBootstrap(appComponentType, appInjector);
console.warn('bootstrapWorkerApp is deprecated. Create an @NgModule that includes the `WorkerAppModule` and use `bootstrapModule` with the `workerAppDynamicPlatform()` instead.');
const deprecatedConfiguration = analyzeAppProvidersForDeprecatedConfiguration(customProviders);
const declarations = [deprecatedConfiguration.moduleDeclarations.concat([appComponentType])];
class DynamicModule {
}
/** @nocollapse */
DynamicModule.decorators = [
{ type: NgModule, args: [{
providers: customProviders,
declarations: declarations,
imports: [WorkerAppModule],
bootstrap: [appComponentType]
},] },
];
return platformWorkerAppDynamic()
.bootstrapModule(DynamicModule, deprecatedConfiguration.compilerOptions)
.then((moduleRef) => {
const console = moduleRef.injector.get(Console);
deprecatedConfiguration.deprecationMessages.forEach((msg) => console.warn(msg));
const appRef = moduleRef.injector.get(ApplicationRef);
return appRef.components[0];
});
}
function normalizeArray(arr) {
return arr ? arr : [];
}
//# sourceMappingURL=index.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"BROWSER_APP_COMPILER_PROVIDERS":{"__symbolic":"error","message":"Function call not supported","line":26,"character":15},"CACHED_TEMPLATE_PROVIDER":[{"provide":{"__symbolic":"reference","module":"@angular/compiler","name":"XHR"},"useClass":{"__symbolic":"reference","module":"./src/xhr/xhr_cache","name":"CachedXHR"}}]}}
{"__symbolic":"module","version":1,"metadata":{"BROWSER_APP_COMPILER_PROVIDERS":[],"CACHED_TEMPLATE_PROVIDER":[{"provide":{"__symbolic":"reference","module":"@angular/compiler","name":"XHR"},"useClass":{"__symbolic":"reference","module":"./src/xhr/xhr_cache","name":"CachedXHR"}}],"platformBrowserDynamic":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"createPlatformFactory"},"arguments":[{"__symbolic":"reference","module":"@angular/compiler","name":"platformCoreDynamic"},"browserDynamic",{"__symbolic":"reference","module":"./src/platform_providers","name":"INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS"}]},"browserDynamicPlatform":{"__symbolic":"reference","name":"platformBrowserDynamic"},"bootstrapWorkerUi":{"__symbolic":"function","parameters":["workerScriptUri","customProviders"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Promise"},"member":"resolve"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/platform-browser","name":"platformWorkerUi"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":[{"provide":{"__symbolic":"reference","module":"@angular/platform-browser","name":"WORKER_SCRIPT"},"useValue":{"__symbolic":"reference","name":"workerScriptUri"}}],"member":"concat"},"arguments":[{"__symbolic":"reference","name":"customProviders"}]}]}]},"defaults":[null,[]]},"platformWorkerAppDynamic":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"createPlatformFactory"},"arguments":[{"__symbolic":"reference","module":"@angular/compiler","name":"platformCoreDynamic"},"workerAppDynamic",[{"provide":{"__symbolic":"reference","module":"@angular/core","name":"COMPILER_OPTIONS"},"useValue":{"providers":[{"provide":{"__symbolic":"reference","module":"@angular/compiler","name":"XHR"},"useClass":{"__symbolic":"reference","module":"./src/xhr/xhr_impl","name":"XHRImpl"}}]},"multi":true}]]},"workerAppDynamicPlatform":{"__symbolic":"reference","name":"platformWorkerAppDynamic"}}}

@@ -9,2 +9,3 @@ /**

import { __platform_browser_private__ as t } from '@angular/platform-browser';
export declare var INTERNAL_BROWSER_PLATFORM_PROVIDERS: typeof t.INTERNAL_BROWSER_PLATFORM_PROVIDERS;
export declare var getDOM: typeof t.getDOM;

@@ -9,3 +9,4 @@ /**

import { __platform_browser_private__ as r } from '@angular/platform-browser';
export var INTERNAL_BROWSER_PLATFORM_PROVIDERS = r.INTERNAL_BROWSER_PLATFORM_PROVIDERS;
export var getDOM = r.getDOM;
//# sourceMappingURL=platform_browser_private.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"getDOM":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/platform-browser","name":"___platform_browser_private__"},"member":"getDOM"}}}
{"__symbolic":"module","version":1,"metadata":{"INTERNAL_BROWSER_PLATFORM_PROVIDERS":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/platform-browser","name":"___platform_browser_private__"},"member":"INTERNAL_BROWSER_PLATFORM_PROVIDERS"},"getDOM":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/platform-browser","name":"___platform_browser_private__"},"member":"getDOM"}}}

@@ -47,3 +47,3 @@ export declare var Map: MapConstructor;

[key: string]: V;
}, callback: Function): void;
}, callback: (v: V, K: string) => void): void;
static merge<V>(m1: {

@@ -50,0 +50,0 @@ [key: string]: V;

@@ -120,6 +120,3 @@ /**

static values(map) {
return Object.keys(map).reduce((r, a) => {
r.push(map[a]);
return r;
}, []);
return Object.keys(map).map((k) => map[k]);
}

@@ -134,6 +131,4 @@ static isEmpty(map) {

static forEach(map, callback) {
for (var prop in map) {
if (map.hasOwnProperty(prop)) {
callback(map[prop], prop);
}
for (let k of Object.keys(map)) {
callback(map[k], k);
}

@@ -143,11 +138,7 @@ }

var m = {};
for (var attr in m1) {
if (m1.hasOwnProperty(attr)) {
m[attr] = m1[attr];
}
for (let k of Object.keys(m1)) {
m[k] = m1[k];
}
for (var attr in m2) {
if (m2.hasOwnProperty(attr)) {
m[attr] = m2[attr];
}
for (let k of Object.keys(m2)) {
m[k] = m2[k];
}

@@ -154,0 +145,0 @@ return m;

@@ -18,3 +18,3 @@ /**

*
* bootstrap(MyApp, {provide: ExceptionHandler, useClass: MyExceptionHandler}])
* bootstrap(MyApp, [{provide: ExceptionHandler, useClass: MyExceptionHandler}])
*

@@ -21,0 +21,0 @@ * ```

@@ -38,3 +38,3 @@ /**

*
* bootstrap(MyApp, {provide: ExceptionHandler, useClass: MyExceptionHandler}])
* bootstrap(MyApp, [{provide: ExceptionHandler, useClass: MyExceptionHandler}])
*

@@ -41,0 +41,0 @@ * ```

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"makeTypeError":{"__symbolic":"function","parameters":["message"],"value":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"TypeError"},"arguments":[{"__symbolic":"reference","name":"message"}]}}}}
{"__symbolic":"module","version":1,"metadata":{"makeTypeError":{"__symbolic":"function","parameters":["message"],"value":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"TypeError"},"arguments":[{"__symbolic":"reference","name":"message"}]}}},"exports":[{"from":"./exception_handler","export":["ExceptionHandler"]}]}

@@ -30,3 +30,2 @@ /**

export declare function scheduleMicroTask(fn: Function): void;
export declare const IS_DART: boolean;
declare var _global: BrowserNodeGlobal;

@@ -109,18 +108,2 @@ export { _global as global };

export declare var RegExp: RegExpConstructor;
export declare class RegExpWrapper {
static create(regExpStr: string, flags?: string): RegExp;
static firstMatch(regExp: RegExp, input: string): RegExpExecArray;
static test(regExp: RegExp, input: string): boolean;
static matcher(regExp: RegExp, input: string): {
re: RegExp;
input: string;
};
static replaceAll(regExp: RegExp, input: string, replace: Function): string;
}
export declare class RegExpMatcherWrapper {
static next(matcher: {
re: RegExp;
input: string;
}): RegExpExecArray;
}
export declare class FunctionWrapper {

@@ -127,0 +110,0 @@ static apply(fn: Function, posArgs: any): any;

@@ -24,3 +24,2 @@ /**

}
export const IS_DART = false;
// Need to declare a new variable for global here since TypeScript

@@ -82,3 +81,5 @@ // exports the original value of the symbol.

export function isPromise(obj) {
return obj instanceof _global.Promise;
// allow any Promise/A+ compliant thenable.
// It's up to the caller to ensure that obj.then conforms to the spec
return isPresent(obj) && isFunction(obj.then);
}

@@ -99,8 +100,8 @@ export function isArray(obj) {

}
if (token.overriddenName) {
return token.overriddenName;
}
if (token.name) {
return token.name;
}
if (token.overriddenName) {
return token.overriddenName;
}
var res = token.toString();

@@ -231,44 +232,2 @@ var newLineIndex = res.indexOf('\n');

export var RegExp = _global.RegExp;
export class RegExpWrapper {
static create(regExpStr, flags = '') {
flags = flags.replace(/g/g, '');
return new _global.RegExp(regExpStr, flags + 'g');
}
static firstMatch(regExp, input) {
// Reset multimatch regex state
regExp.lastIndex = 0;
return regExp.exec(input);
}
static test(regExp, input) {
regExp.lastIndex = 0;
return regExp.test(input);
}
static matcher(regExp, input) {
// Reset regex state for the case
// someone did not loop over all matches
// last time.
regExp.lastIndex = 0;
return { re: regExp, input: input };
}
static replaceAll(regExp, input, replace) {
let c = regExp.exec(input);
let res = '';
regExp.lastIndex = 0;
let prev = 0;
while (c) {
res += input.substring(prev, c.index);
res += replace(c);
prev = c.index + c[0].length;
regExp.lastIndex = prev;
c = regExp.exec(input);
}
res += input.substring(prev);
return res;
}
}
export class RegExpMatcherWrapper {
static next(matcher) {
return matcher.re.exec(matcher.input);
}
}
export class FunctionWrapper {

@@ -275,0 +234,0 @@ static apply(fn, posArgs) { return fn.apply(null, posArgs); }

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"IS_DART":false,"Type":{"__symbolic":"reference","name":"Function"},"Math":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"Math"},"Date":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"Date"},"isPresent":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBoolean":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":106,"character":8},"right":"boolean"}},"isNumber":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":110,"character":8},"right":"number"}},"isString":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":114,"character":8},"right":"string"}},"isFunction":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":118,"character":8},"right":"function"}},"isType":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isFunction"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":126,"character":8},"right":"object"},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isStrictStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isStringMap"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"reference","name":"STRING_MAP_PROTO"}}}},"isPromise":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"Promise"}}},"isArray":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Array"},"member":"isArray"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isDate":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"Date"}},"right":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"obj"},"member":"valueOf"}}]}}}},"serializeEnum":{"__symbolic":"function","parameters":["val"],"value":{"__symbolic":"reference","name":"val"}},"deserializeEnum":{"__symbolic":"function","parameters":["val","values"],"value":{"__symbolic":"reference","name":"val"}},"resolveEnumToken":{"__symbolic":"function","parameters":["enumValue","val"],"value":{"__symbolic":"index","expression":{"__symbolic":"reference","name":"enumValue"},"index":{"__symbolic":"reference","name":"val"}}},"RegExp":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"RegExp"},"looseIdentical":{"__symbolic":"function","parameters":["a","b"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"a"},"right":{"__symbolic":"reference","name":"b"}},"right":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":366,"character":19},"right":"number"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":366,"character":44},"right":"number"}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"a"}]}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"b"}]}}}},"getMapKey":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"reference","name":"value"}},"normalizeBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"error","message":"Expression form not supported","line":376,"character":8}},"normalizeBool":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"error","message":"Expression form not supported","line":380,"character":8}},"isJsObject":{"__symbolic":"function","parameters":["o"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"o"},"right":null},"right":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":384,"character":24},"right":"function"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":384,"character":50},"right":"object"}}}},"isPrimitive":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isJsObject"},"arguments":[{"__symbolic":"reference","name":"obj"}]}}},"hasConstructor":{"__symbolic":"function","parameters":["value","type"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"value"},"member":"constructor"},"right":{"__symbolic":"reference","name":"type"}}},"escape":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"encodeURI"},"arguments":[{"__symbolic":"reference","name":"s"}]}},"escapeRegExp":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Expression form not supported","line":481,"character":19}}}}
{"__symbolic":"module","version":1,"metadata":{"Type":{"__symbolic":"reference","name":"Function"},"Math":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":3,"context":{"name":"_global"}},"Date":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":3,"context":{"name":"_global"}},"isPresent":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBoolean":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":104,"character":8},"right":"boolean"}},"isNumber":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":108,"character":8},"right":"number"}},"isString":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":112,"character":8},"right":"string"}},"isFunction":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":116,"character":8},"right":"function"}},"isType":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isFunction"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":124,"character":8},"right":"object"},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isStrictStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isStringMap"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"error","message":"Reference to a local symbol","line":127,"character":5,"context":{"name":"STRING_MAP_PROTO"}}}}},"isPromise":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isPresent"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isFunction"},"arguments":[{"__symbolic":"select","expression":{"__symbolic":"reference","name":"obj"},"member":"then"}]}}},"isArray":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Array"},"member":"isArray"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isDate":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"Date"}},"right":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"obj"},"member":"valueOf"}}]}}}},"serializeEnum":{"__symbolic":"function","parameters":["val"],"value":{"__symbolic":"reference","name":"val"}},"deserializeEnum":{"__symbolic":"function","parameters":["val","values"],"value":{"__symbolic":"reference","name":"val"}},"resolveEnumToken":{"__symbolic":"function","parameters":["enumValue","val"],"value":{"__symbolic":"index","expression":{"__symbolic":"reference","name":"enumValue"},"index":{"__symbolic":"reference","name":"val"}}},"RegExp":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":3,"context":{"name":"_global"}},"looseIdentical":{"__symbolic":"function","parameters":["a","b"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"a"},"right":{"__symbolic":"reference","name":"b"}},"right":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":322,"character":19},"right":"number"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":322,"character":44},"right":"number"}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"a"}]}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"b"}]}}}},"getMapKey":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"reference","name":"value"}},"normalizeBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"if","condition":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isBlank"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"thenExpression":null,"elseExpression":{"__symbolic":"reference","name":"obj"}}},"normalizeBool":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"if","condition":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isBlank"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"thenExpression":false,"elseExpression":{"__symbolic":"reference","name":"obj"}}},"isJsObject":{"__symbolic":"function","parameters":["o"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"o"},"right":null},"right":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":340,"character":24},"right":"function"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":340,"character":50},"right":"object"}}}},"isPrimitive":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isJsObject"},"arguments":[{"__symbolic":"reference","name":"obj"}]}}},"hasConstructor":{"__symbolic":"function","parameters":["value","type"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"value"},"member":"constructor"},"right":{"__symbolic":"reference","name":"type"}}},"escape":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":3,"context":{"name":"_global"}}},"escapeRegExp":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Expression form not supported","line":437,"character":19}}}}

@@ -11,3 +11,2 @@ /**

import { global } from '../facade/lang';
import { PromiseWrapper } from '../facade/promise';
/**

@@ -30,6 +29,6 @@ * An implementation of XHR that uses a template cache to avoid doing an actual

if (this._cache.hasOwnProperty(url)) {
return PromiseWrapper.resolve(this._cache[url]);
return Promise.resolve(this._cache[url]);
}
else {
return PromiseWrapper.reject('CachedXHR: Did not find cached template for ' + url, null);
return Promise.reject('CachedXHR: Did not find cached template for ' + url);
}

@@ -36,0 +35,0 @@ }

@@ -1,14 +0,12 @@

/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { XHR } from '@angular/compiler';
import { Injectable } from '@angular/core';
import { isPresent } from '../facade/lang';
import { PromiseWrapper } from '../facade/promise';
export class XHRImpl extends XHR {
get(url) {
var completer = PromiseWrapper.completer();
var resolve;
var reject;
const promise = new Promise((res, rej) => {
resolve = res;
reject = rej;
});
var xhr = new XMLHttpRequest();

@@ -30,13 +28,17 @@ xhr.open('GET', url, true);

if (200 <= status && status <= 300) {
completer.resolve(response);
resolve(response);
}
else {
completer.reject(`Failed to load ${url}`, null);
reject(`Failed to load ${url}`);
}
};
xhr.onerror = function () { completer.reject(`Failed to load ${url}`, null); };
xhr.onerror = function () { reject(`Failed to load ${url}`); };
xhr.send();
return completer.promise;
return promise;
}
}
/** @nocollapse */
XHRImpl.decorators = [
{ type: Injectable },
];
//# sourceMappingURL=xhr_impl.js.map

@@ -0,13 +1,21 @@

import { PlatformRef } from '@angular/core';
export * from './private_export_testing';
/**
* Default platform providers for testing.
* @experimental API related to bootstrapping are still under review.
*/
export declare const platformBrowserDynamicTesting: (extraProviders?: any[]) => PlatformRef;
/**
* NgModule for testing.
*
* @stable
*/
export declare class BrowserDynamicTestingModule {
}
/**
* @deprecated Use initTestEnvironment with platformBrowserDynamicTesting instead.
*/
export declare const TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS: Array<any>;
/**
* Default application providers for testing.
*
* @stable
* @deprecated Use initTestEnvironment with BrowserDynamicTestingModule instead.
*/
export declare const TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS: Array<any>;

@@ -8,29 +8,57 @@ /**

*/
import { DirectiveResolver, ViewResolver } from '@angular/compiler';
import { MockDirectiveResolver, MockViewResolver, OverridingTestComponentBuilder } from '@angular/compiler/testing';
import { TestComponentBuilder, TestComponentRenderer } from '@angular/core/testing';
import { TEST_BROWSER_APPLICATION_PROVIDERS, TEST_BROWSER_PLATFORM_PROVIDERS } from '@angular/platform-browser/testing';
import { BROWSER_APP_COMPILER_PROVIDERS } from './index';
import { analyzeAppProvidersForDeprecatedConfiguration } from '@angular/compiler';
import { OverridingTestComponentBuilder, platformCoreDynamicTesting } from '@angular/compiler/testing';
import { COMPILER_OPTIONS, NgModule, createPlatformFactory } from '@angular/core';
import { TestBed, TestComponentBuilder, TestComponentRenderer } from '@angular/core/testing';
import { BrowserTestingModule } from '@angular/platform-browser/testing';
import { Console } from './core_private';
import { INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS } from './src/platform_providers';
import { DOMTestComponentRenderer } from './testing/dom_test_component_renderer';
export * from './private_export_testing';
/**
* Default platform providers for testing.
*
* @stable
* @experimental API related to bootstrapping are still under review.
*/
export const TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS = [TEST_BROWSER_PLATFORM_PROVIDERS];
export const platformBrowserDynamicTesting = createPlatformFactory(platformCoreDynamicTesting, 'browserDynamicTesting', INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS);
export class BrowserDynamicTestingModule {
}
/** @nocollapse */
BrowserDynamicTestingModule.decorators = [
{ type: NgModule, args: [{
exports: [BrowserTestingModule],
providers: [
{ provide: TestComponentBuilder, useClass: OverridingTestComponentBuilder },
{ provide: TestComponentRenderer, useClass: DOMTestComponentRenderer },
]
},] },
];
/**
* Default application providers for testing.
*
* @stable
* @deprecated Use initTestEnvironment with platformBrowserDynamicTesting instead.
*/
export const TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS = [
TEST_BROWSER_APPLICATION_PROVIDERS, BROWSER_APP_COMPILER_PROVIDERS,
[
{ provide: TestComponentBuilder, useClass: OverridingTestComponentBuilder },
{ provide: DirectiveResolver, useClass: MockDirectiveResolver },
{ provide: ViewResolver, useClass: MockViewResolver },
{ provide: TestComponentRenderer, useClass: DOMTestComponentRenderer },
]
];
export const TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS =
// Note: This is not a real provider but a hack to still support the deprecated
// `setBaseTestProviders` method!
[(appProviders) => {
const deprecatedConfiguration = analyzeAppProvidersForDeprecatedConfiguration(appProviders);
const platformRef = createPlatformFactory(platformBrowserDynamicTesting, 'browserDynamicTestingDeprecated', [{
provide: COMPILER_OPTIONS,
useValue: deprecatedConfiguration.compilerOptions,
multi: true
}])();
class DynamicTestModule {
}
/** @nocollapse */
DynamicTestModule.decorators = [
{ type: NgModule, args: [{
exports: [BrowserDynamicTestingModule],
declarations: [deprecatedConfiguration.moduleDeclarations]
},] },
];
const testInjector = TestBed.initTestEnvironment(DynamicTestModule, platformRef);
const console = testInjector.get(Console);
deprecatedConfiguration.deprecationMessages.forEach((msg) => console.warn(msg));
}];
/**
* @deprecated Use initTestEnvironment with BrowserDynamicTestingModule instead.
*/
export const TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS = [];
//# sourceMappingURL=testing.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS":[{"__symbolic":"reference","module":"@angular/platform-browser/testing","name":"TEST_BROWSER_PLATFORM_PROVIDERS"}],"TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS":[{"__symbolic":"reference","module":"@angular/platform-browser/testing","name":"TEST_BROWSER_APPLICATION_PROVIDERS"},{"__symbolic":"reference","module":"./index","name":"BROWSER_APP_COMPILER_PROVIDERS"},[{"provide":{"__symbolic":"reference","module":"@angular/core/testing","name":"TestComponentBuilder"},"useClass":{"__symbolic":"reference","module":"@angular/compiler/testing","name":"OverridingTestComponentBuilder"}},{"provide":{"__symbolic":"reference","module":"@angular/compiler","name":"DirectiveResolver"},"useClass":{"__symbolic":"reference","module":"@angular/compiler/testing","name":"MockDirectiveResolver"}},{"provide":{"__symbolic":"reference","module":"@angular/compiler","name":"ViewResolver"},"useClass":{"__symbolic":"reference","module":"@angular/compiler/testing","name":"MockViewResolver"}},{"provide":{"__symbolic":"reference","module":"@angular/core/testing","name":"TestComponentRenderer"},"useClass":{"__symbolic":"reference","module":"./testing/dom_test_component_renderer","name":"DOMTestComponentRenderer"}}]]}}
{"__symbolic":"module","version":1,"metadata":{"platformBrowserDynamicTesting":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"createPlatformFactory"},"arguments":[{"__symbolic":"reference","module":"@angular/compiler/testing","name":"platformCoreDynamicTesting"},"browserDynamicTesting",{"__symbolic":"reference","module":"./src/platform_providers","name":"INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS"}]},"BrowserDynamicTestingModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"exports":[{"__symbolic":"reference","module":"@angular/platform-browser/testing","name":"BrowserTestingModule"}],"providers":[{"provide":{"__symbolic":"reference","module":"@angular/core/testing","name":"TestComponentBuilder"},"useClass":{"__symbolic":"reference","module":"@angular/compiler/testing","name":"OverridingTestComponentBuilder"}},{"provide":{"__symbolic":"reference","module":"@angular/core/testing","name":"TestComponentRenderer"},"useClass":{"__symbolic":"reference","module":"./testing/dom_test_component_renderer","name":"DOMTestComponentRenderer"}}]}]}]},"TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS":{"__symbolic":"error","message":"Function call not supported","line":48,"character":5},"TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS":[]},"exports":[{"from":"./private_export_testing"}]}

@@ -0,10 +1,3 @@

import { TestComponentRenderer } from '@angular/core/testing';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { TestComponentRenderer } from '@angular/compiler/testing';
/**
* A DOM based implementation of the TestComponentRenderer.

@@ -11,0 +4,0 @@ */

@@ -8,4 +8,4 @@ /**

*/
import { TestComponentRenderer } from '@angular/compiler/testing';
import { Inject, Injectable } from '@angular/core';
import { TestComponentRenderer } from '@angular/core/testing';
import { DOCUMENT } from '@angular/platform-browser';

@@ -12,0 +12,0 @@ import { getDOM } from '../platform_browser_private';

@@ -1,4 +0,6 @@

import { ApplicationRef, ComponentRef, Type } from '@angular/core';
import { ComponentRef, PlatformRef } from '@angular/core';
import { ConcreteType } from './src/facade/lang';
/**
* @experimental
* @deprecated The compiler providers are already included in the {@link CompilerFactory} that is
* contained the {@link browserDynamicPlatform}()`.
*/

@@ -11,2 +13,10 @@ export declare const BROWSER_APP_COMPILER_PROVIDERS: Array<any>;

/**
* @experimental API related to bootstrapping are still under review.
*/
export declare const platformBrowserDynamic: (extraProviders?: any[]) => PlatformRef;
/**
* @deprecated Use {@link platformBrowserDynamic} instead
*/
export declare const browserDynamicPlatform: (extraProviders?: any[]) => PlatformRef;
/**
* Bootstrapping for Angular applications.

@@ -70,3 +80,3 @@ *

*
* ## API
* ## API (version 1)
*

@@ -78,15 +88,34 @@ * - `appComponentType`: The root component which should act as the application. This is

*
* ## API (version 2)
* - `appComponentType`: The root component which should act as the application. This is
* a reference to a `Type` which is annotated with `@Component(...)`.
* - `providers`, `declarations`, `imports`, `entryComponents`: Defines the properties
* of the dynamically created module that is used to bootstrap the module.
* - to configure the compiler, use the `compilerOptions` parameter.
*
* Returns a `Promise` of {@link ComponentRef}.
*
* @experimental This api cannot be used with the offline compiler and thus is still subject to
* change.
* @deprecated This api cannot be used with the offline compiler. Use
* `PlatformRef.boostrapModule()` instead.
*/
export declare function bootstrap(appComponentType: Type, customProviders?: Array<any>): Promise<ComponentRef<any>>;
export declare function bootstrap<C>(appComponentType: ConcreteType<C>, customProviders?: Array<any>): Promise<ComponentRef<C>>;
/**
* Bootstraps the worker ui.
*
* @experimental
*/
export declare function bootstrapWorkerUi(workerScriptUri: string, customProviders?: Array<any>): Promise<ApplicationRef>;
export declare function bootstrapWorkerUi(workerScriptUri: string, customProviders?: Array<any>): Promise<PlatformRef>;
/**
* @experimental
* @experimental API related to bootstrapping are still under review.
*/
export declare function bootstrapWorkerApp(appComponentType: Type, customProviders?: Array<any>): Promise<ComponentRef<any>>;
export declare const platformWorkerAppDynamic: (extraProviders?: any[]) => PlatformRef;
/**
* @deprecated Use {@link platformWorkerAppDynamic} instead
*/
export declare const workerAppDynamicPlatform: (extraProviders?: any[]) => PlatformRef;
/**
* @deprecated Create an {@link NgModule} that includes the {@link WorkerAppModule} and use {@link
* bootstrapModule}
* with the {@link workerAppDynamicPlatform}() instead.
*/
export declare function bootstrapWorkerApp<T>(appComponentType: ConcreteType<T>, customProviders?: Array<any>): Promise<ComponentRef<T>>;

@@ -9,3 +9,2 @@ /**

"use strict";
var common_1 = require('@angular/common');
var compiler_1 = require('@angular/compiler');

@@ -15,21 +14,10 @@ var core_1 = require('@angular/core');

var core_private_1 = require('./core_private');
var async_1 = require('./src/facade/async');
var lang_1 = require('./src/facade/lang');
var platform_providers_1 = require('./src/platform_providers');
var xhr_cache_1 = require('./src/xhr/xhr_cache');
var xhr_impl_1 = require('./src/xhr/xhr_impl');
/**
* @experimental
* @deprecated The compiler providers are already included in the {@link CompilerFactory} that is
* contained the {@link browserDynamicPlatform}()`.
*/
exports.BROWSER_APP_COMPILER_PROVIDERS = [
compiler_1.COMPILER_PROVIDERS, {
provide: compiler_1.CompilerConfig,
useFactory: function (platformDirectives, platformPipes) {
return new compiler_1.CompilerConfig({ platformDirectives: platformDirectives, platformPipes: platformPipes });
},
deps: [core_1.PLATFORM_DIRECTIVES, core_1.PLATFORM_PIPES]
},
{ provide: compiler_1.XHR, useClass: xhr_impl_1.XHRImpl },
{ provide: core_1.PLATFORM_DIRECTIVES, useValue: common_1.COMMON_DIRECTIVES, multi: true },
{ provide: core_1.PLATFORM_PIPES, useValue: common_1.COMMON_PIPES, multi: true }
];
exports.BROWSER_APP_COMPILER_PROVIDERS = [];
/**

@@ -40,2 +28,10 @@ * @experimental

/**
* @experimental API related to bootstrapping are still under review.
*/
exports.platformBrowserDynamic = core_1.createPlatformFactory(compiler_1.platformCoreDynamic, 'browserDynamic', platform_providers_1.INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS);
/**
* @deprecated Use {@link platformBrowserDynamic} instead
*/
exports.browserDynamicPlatform = exports.platformBrowserDynamic;
/**
* Bootstrapping for Angular applications.

@@ -99,3 +95,3 @@ *

*
* ## API
* ## API (version 1)
*

@@ -107,58 +103,112 @@ * - `appComponentType`: The root component which should act as the application. This is

*
* ## API (version 2)
* - `appComponentType`: The root component which should act as the application. This is
* a reference to a `Type` which is annotated with `@Component(...)`.
* - `providers`, `declarations`, `imports`, `entryComponents`: Defines the properties
* of the dynamically created module that is used to bootstrap the module.
* - to configure the compiler, use the `compilerOptions` parameter.
*
* Returns a `Promise` of {@link ComponentRef}.
*
* @experimental This api cannot be used with the offline compiler and thus is still subject to
* change.
* @deprecated This api cannot be used with the offline compiler. Use
* `PlatformRef.boostrapModule()` instead.
*/
// Note: We are using typescript overloads here to have 2 function signatures!
function bootstrap(appComponentType, customProviders) {
core_private_1.reflector.reflectionCapabilities = new core_private_1.ReflectionCapabilities();
var providers = [
platform_browser_1.BROWSER_APP_PROVIDERS, exports.BROWSER_APP_COMPILER_PROVIDERS,
lang_1.isPresent(customProviders) ? customProviders : []
];
var appInjector = core_1.ReflectiveInjector.resolveAndCreate(providers, platform_browser_1.browserPlatform().injector);
return core_1.coreLoadAndBootstrap(appComponentType, appInjector);
var compilerOptions;
var declarations = [];
var entryComponents = [];
var deprecationMessages = [];
var deprecatedConfiguration = compiler_1.analyzeAppProvidersForDeprecatedConfiguration(customProviders);
declarations = deprecatedConfiguration.moduleDeclarations.concat(declarations);
compilerOptions = deprecatedConfiguration.compilerOptions;
deprecationMessages = deprecatedConfiguration.deprecationMessages;
var DynamicModule = (function () {
function DynamicModule() {
}
/** @nocollapse */
DynamicModule.decorators = [
{ type: core_1.NgModule, args: [{
providers: customProviders,
declarations: declarations.concat([appComponentType]),
imports: [platform_browser_1.BrowserModule],
entryComponents: entryComponents,
bootstrap: [appComponentType],
schemas: [core_1.CUSTOM_ELEMENTS_SCHEMA]
},] },
];
return DynamicModule;
}());
return exports.platformBrowserDynamic()
.bootstrapModule(DynamicModule, compilerOptions)
.then(function (moduleRef) {
var console = moduleRef.injector.get(core_private_1.Console);
deprecationMessages.forEach(function (msg) { return console.warn(msg); });
var appRef = moduleRef.injector.get(core_1.ApplicationRef);
return appRef.components[0];
});
}
exports.bootstrap = bootstrap;
/**
* Bootstraps the worker ui.
*
* @experimental
*/
function bootstrapWorkerUi(workerScriptUri, customProviders) {
var app = core_1.ReflectiveInjector.resolveAndCreate([
platform_browser_1.WORKER_UI_APPLICATION_PROVIDERS, exports.BROWSER_APP_COMPILER_PROVIDERS,
{ provide: platform_browser_1.WORKER_SCRIPT, useValue: workerScriptUri },
lang_1.isPresent(customProviders) ? customProviders : []
], platform_browser_1.workerUiPlatform().injector);
// Return a promise so that we keep the same semantics as Dart,
// and we might want to wait for the app side to come up
// in the future...
return async_1.PromiseWrapper.resolve(app.get(core_1.ApplicationRef));
if (customProviders === void 0) { customProviders = []; }
// For now, just creates the worker ui platform...
return Promise.resolve(platform_browser_1.platformWorkerUi([{
provide: platform_browser_1.WORKER_SCRIPT,
useValue: workerScriptUri,
}].concat(customProviders)));
}
exports.bootstrapWorkerUi = bootstrapWorkerUi;
/**
* @experimental
* @experimental API related to bootstrapping are still under review.
*/
var WORKER_APP_COMPILER_PROVIDERS = [
compiler_1.COMPILER_PROVIDERS, {
provide: compiler_1.CompilerConfig,
useFactory: function (platformDirectives, platformPipes) {
return new compiler_1.CompilerConfig({ platformDirectives: platformDirectives, platformPipes: platformPipes });
},
deps: [core_1.PLATFORM_DIRECTIVES, core_1.PLATFORM_PIPES]
},
{ provide: compiler_1.XHR, useClass: xhr_impl_1.XHRImpl },
{ provide: core_1.PLATFORM_DIRECTIVES, useValue: common_1.COMMON_DIRECTIVES, multi: true },
{ provide: core_1.PLATFORM_PIPES, useValue: common_1.COMMON_PIPES, multi: true }
];
exports.platformWorkerAppDynamic = core_1.createPlatformFactory(compiler_1.platformCoreDynamic, 'workerAppDynamic', [{
provide: core_1.COMPILER_OPTIONS,
useValue: { providers: [{ provide: compiler_1.XHR, useClass: xhr_impl_1.XHRImpl }] },
multi: true
}]);
/**
* @experimental
* @deprecated Use {@link platformWorkerAppDynamic} instead
*/
exports.workerAppDynamicPlatform = exports.platformWorkerAppDynamic;
/**
* @deprecated Create an {@link NgModule} that includes the {@link WorkerAppModule} and use {@link
* bootstrapModule}
* with the {@link workerAppDynamicPlatform}() instead.
*/
function bootstrapWorkerApp(appComponentType, customProviders) {
var appInjector = core_1.ReflectiveInjector.resolveAndCreate([
platform_browser_1.WORKER_APP_APPLICATION_PROVIDERS, WORKER_APP_COMPILER_PROVIDERS,
lang_1.isPresent(customProviders) ? customProviders : []
], platform_browser_1.workerAppPlatform().injector);
return core_1.coreLoadAndBootstrap(appComponentType, appInjector);
console.warn('bootstrapWorkerApp is deprecated. Create an @NgModule that includes the `WorkerAppModule` and use `bootstrapModule` with the `workerAppDynamicPlatform()` instead.');
var deprecatedConfiguration = compiler_1.analyzeAppProvidersForDeprecatedConfiguration(customProviders);
var declarations = [deprecatedConfiguration.moduleDeclarations.concat([appComponentType])];
var DynamicModule = (function () {
function DynamicModule() {
}
/** @nocollapse */
DynamicModule.decorators = [
{ type: core_1.NgModule, args: [{
providers: customProviders,
declarations: declarations,
imports: [platform_browser_1.WorkerAppModule],
bootstrap: [appComponentType]
},] },
];
return DynamicModule;
}());
return exports.platformWorkerAppDynamic()
.bootstrapModule(DynamicModule, deprecatedConfiguration.compilerOptions)
.then(function (moduleRef) {
var console = moduleRef.injector.get(core_private_1.Console);
deprecatedConfiguration.deprecationMessages.forEach(function (msg) { return console.warn(msg); });
var appRef = moduleRef.injector.get(core_1.ApplicationRef);
return appRef.components[0];
});
}
exports.bootstrapWorkerApp = bootstrapWorkerApp;
function normalizeArray(arr) {
return arr ? arr : [];
}
//# sourceMappingURL=index.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"BROWSER_APP_COMPILER_PROVIDERS":{"__symbolic":"error","message":"Function call not supported","line":26,"character":15},"CACHED_TEMPLATE_PROVIDER":[{"provide":{"__symbolic":"reference","module":"@angular/compiler","name":"XHR"},"useClass":{"__symbolic":"reference","module":"./src/xhr/xhr_cache","name":"CachedXHR"}}]}}
{"__symbolic":"module","version":1,"metadata":{"BROWSER_APP_COMPILER_PROVIDERS":[],"CACHED_TEMPLATE_PROVIDER":[{"provide":{"__symbolic":"reference","module":"@angular/compiler","name":"XHR"},"useClass":{"__symbolic":"reference","module":"./src/xhr/xhr_cache","name":"CachedXHR"}}],"platformBrowserDynamic":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"createPlatformFactory"},"arguments":[{"__symbolic":"reference","module":"@angular/compiler","name":"platformCoreDynamic"},"browserDynamic",{"__symbolic":"reference","module":"./src/platform_providers","name":"INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS"}]},"browserDynamicPlatform":{"__symbolic":"reference","name":"platformBrowserDynamic"},"bootstrapWorkerUi":{"__symbolic":"function","parameters":["workerScriptUri","customProviders"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Promise"},"member":"resolve"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/platform-browser","name":"platformWorkerUi"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":[{"provide":{"__symbolic":"reference","module":"@angular/platform-browser","name":"WORKER_SCRIPT"},"useValue":{"__symbolic":"reference","name":"workerScriptUri"}}],"member":"concat"},"arguments":[{"__symbolic":"reference","name":"customProviders"}]}]}]},"defaults":[null,[]]},"platformWorkerAppDynamic":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"createPlatformFactory"},"arguments":[{"__symbolic":"reference","module":"@angular/compiler","name":"platformCoreDynamic"},"workerAppDynamic",[{"provide":{"__symbolic":"reference","module":"@angular/core","name":"COMPILER_OPTIONS"},"useValue":{"providers":[{"provide":{"__symbolic":"reference","module":"@angular/compiler","name":"XHR"},"useClass":{"__symbolic":"reference","module":"./src/xhr/xhr_impl","name":"XHRImpl"}}]},"multi":true}]]},"workerAppDynamicPlatform":{"__symbolic":"reference","name":"platformWorkerAppDynamic"}}}
{
"name": "@angular/platform-browser-dynamic",
"version": "2.0.0-rc.4",
"version": "2.0.0-rc.5",
"description": "",

@@ -11,6 +11,6 @@ "main": "index.js",

"peerDependencies": {
"@angular/core": "^2.0.0-rc.4",
"@angular/common": "^2.0.0-rc.4",
"@angular/compiler": "^2.0.0-rc.4",
"@angular/platform-browser": "^2.0.0-rc.4"
"@angular/core": "^2.0.0-rc.5",
"@angular/common": "^2.0.0-rc.5",
"@angular/compiler": "^2.0.0-rc.5",
"@angular/platform-browser": "^2.0.0-rc.5"
},

@@ -17,0 +17,0 @@ "repository": {

@@ -9,2 +9,3 @@ /**

import { __platform_browser_private__ as t } from '@angular/platform-browser';
export declare var INTERNAL_BROWSER_PLATFORM_PROVIDERS: typeof t.INTERNAL_BROWSER_PLATFORM_PROVIDERS;
export declare var getDOM: typeof t.getDOM;

@@ -10,3 +10,4 @@ /**

var platform_browser_1 = require('@angular/platform-browser');
exports.INTERNAL_BROWSER_PLATFORM_PROVIDERS = platform_browser_1.__platform_browser_private__.INTERNAL_BROWSER_PLATFORM_PROVIDERS;
exports.getDOM = platform_browser_1.__platform_browser_private__.getDOM;
//# sourceMappingURL=platform_browser_private.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"getDOM":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/platform-browser","name":"___platform_browser_private__"},"member":"getDOM"}}}
{"__symbolic":"module","version":1,"metadata":{"INTERNAL_BROWSER_PLATFORM_PROVIDERS":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/platform-browser","name":"___platform_browser_private__"},"member":"INTERNAL_BROWSER_PLATFORM_PROVIDERS"},"getDOM":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/platform-browser","name":"___platform_browser_private__"},"member":"getDOM"}}}

@@ -47,3 +47,3 @@ export declare var Map: MapConstructor;

[key: string]: V;
}, callback: Function): void;
}, callback: (v: V, K: string) => void): void;
static merge<V>(m1: {

@@ -50,0 +50,0 @@ [key: string]: V;

@@ -127,6 +127,3 @@ /**

StringMapWrapper.values = function (map) {
return Object.keys(map).reduce(function (r, a) {
r.push(map[a]);
return r;
}, []);
return Object.keys(map).map(function (k) { return map[k]; });
};

@@ -141,6 +138,5 @@ StringMapWrapper.isEmpty = function (map) {

StringMapWrapper.forEach = function (map, callback) {
for (var prop in map) {
if (map.hasOwnProperty(prop)) {
callback(map[prop], prop);
}
for (var _i = 0, _a = Object.keys(map); _i < _a.length; _i++) {
var k = _a[_i];
callback(map[k], k);
}

@@ -150,11 +146,9 @@ };

var m = {};
for (var attr in m1) {
if (m1.hasOwnProperty(attr)) {
m[attr] = m1[attr];
}
for (var _i = 0, _a = Object.keys(m1); _i < _a.length; _i++) {
var k = _a[_i];
m[k] = m1[k];
}
for (var attr in m2) {
if (m2.hasOwnProperty(attr)) {
m[attr] = m2[attr];
}
for (var _b = 0, _c = Object.keys(m2); _b < _c.length; _b++) {
var k = _c[_b];
m[k] = m2[k];
}

@@ -161,0 +155,0 @@ return m;

@@ -18,3 +18,3 @@ /**

*
* bootstrap(MyApp, {provide: ExceptionHandler, useClass: MyExceptionHandler}])
* bootstrap(MyApp, [{provide: ExceptionHandler, useClass: MyExceptionHandler}])
*

@@ -21,0 +21,0 @@ * ```

@@ -40,3 +40,3 @@ /**

*
* bootstrap(MyApp, {provide: ExceptionHandler, useClass: MyExceptionHandler}])
* bootstrap(MyApp, [{provide: ExceptionHandler, useClass: MyExceptionHandler}])
*

@@ -43,0 +43,0 @@ * ```

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"makeTypeError":{"__symbolic":"function","parameters":["message"],"value":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"TypeError"},"arguments":[{"__symbolic":"reference","name":"message"}]}}}}
{"__symbolic":"module","version":1,"metadata":{"makeTypeError":{"__symbolic":"function","parameters":["message"],"value":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"TypeError"},"arguments":[{"__symbolic":"reference","name":"message"}]}}},"exports":[{"from":"./exception_handler","export":["ExceptionHandler"]}]}

@@ -30,3 +30,2 @@ /**

export declare function scheduleMicroTask(fn: Function): void;
export declare const IS_DART: boolean;
declare var _global: BrowserNodeGlobal;

@@ -109,18 +108,2 @@ export { _global as global };

export declare var RegExp: RegExpConstructor;
export declare class RegExpWrapper {
static create(regExpStr: string, flags?: string): RegExp;
static firstMatch(regExp: RegExp, input: string): RegExpExecArray;
static test(regExp: RegExp, input: string): boolean;
static matcher(regExp: RegExp, input: string): {
re: RegExp;
input: string;
};
static replaceAll(regExp: RegExp, input: string, replace: Function): string;
}
export declare class RegExpMatcherWrapper {
static next(matcher: {
re: RegExp;
input: string;
}): RegExpExecArray;
}
export declare class FunctionWrapper {

@@ -127,0 +110,0 @@ static apply(fn: Function, posArgs: any): any;

@@ -31,3 +31,2 @@ /**

exports.scheduleMicroTask = scheduleMicroTask;
exports.IS_DART = false;
// Need to declare a new variable for global here since TypeScript

@@ -99,3 +98,5 @@ // exports the original value of the symbol.

function isPromise(obj) {
return obj instanceof _global.Promise;
// allow any Promise/A+ compliant thenable.
// It's up to the caller to ensure that obj.then conforms to the spec
return isPresent(obj) && isFunction(obj.then);
}

@@ -120,8 +121,8 @@ exports.isPromise = isPromise;

}
if (token.overriddenName) {
return token.overriddenName;
}
if (token.name) {
return token.name;
}
if (token.overriddenName) {
return token.overriddenName;
}
var res = token.toString();

@@ -280,53 +281,2 @@ var newLineIndex = res.indexOf('\n');

exports.RegExp = _global.RegExp;
var RegExpWrapper = (function () {
function RegExpWrapper() {
}
RegExpWrapper.create = function (regExpStr, flags) {
if (flags === void 0) { flags = ''; }
flags = flags.replace(/g/g, '');
return new _global.RegExp(regExpStr, flags + 'g');
};
RegExpWrapper.firstMatch = function (regExp, input) {
// Reset multimatch regex state
regExp.lastIndex = 0;
return regExp.exec(input);
};
RegExpWrapper.test = function (regExp, input) {
regExp.lastIndex = 0;
return regExp.test(input);
};
RegExpWrapper.matcher = function (regExp, input) {
// Reset regex state for the case
// someone did not loop over all matches
// last time.
regExp.lastIndex = 0;
return { re: regExp, input: input };
};
RegExpWrapper.replaceAll = function (regExp, input, replace) {
var c = regExp.exec(input);
var res = '';
regExp.lastIndex = 0;
var prev = 0;
while (c) {
res += input.substring(prev, c.index);
res += replace(c);
prev = c.index + c[0].length;
regExp.lastIndex = prev;
c = regExp.exec(input);
}
res += input.substring(prev);
return res;
};
return RegExpWrapper;
}());
exports.RegExpWrapper = RegExpWrapper;
var RegExpMatcherWrapper = (function () {
function RegExpMatcherWrapper() {
}
RegExpMatcherWrapper.next = function (matcher) {
return matcher.re.exec(matcher.input);
};
return RegExpMatcherWrapper;
}());
exports.RegExpMatcherWrapper = RegExpMatcherWrapper;
var FunctionWrapper = (function () {

@@ -333,0 +283,0 @@ function FunctionWrapper() {

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"IS_DART":false,"Type":{"__symbolic":"reference","name":"Function"},"Math":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"Math"},"Date":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"Date"},"isPresent":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBoolean":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":106,"character":8},"right":"boolean"}},"isNumber":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":110,"character":8},"right":"number"}},"isString":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":114,"character":8},"right":"string"}},"isFunction":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":118,"character":8},"right":"function"}},"isType":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isFunction"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":126,"character":8},"right":"object"},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isStrictStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isStringMap"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"reference","name":"STRING_MAP_PROTO"}}}},"isPromise":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"Promise"}}},"isArray":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Array"},"member":"isArray"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isDate":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"Date"}},"right":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"obj"},"member":"valueOf"}}]}}}},"serializeEnum":{"__symbolic":"function","parameters":["val"],"value":{"__symbolic":"reference","name":"val"}},"deserializeEnum":{"__symbolic":"function","parameters":["val","values"],"value":{"__symbolic":"reference","name":"val"}},"resolveEnumToken":{"__symbolic":"function","parameters":["enumValue","val"],"value":{"__symbolic":"index","expression":{"__symbolic":"reference","name":"enumValue"},"index":{"__symbolic":"reference","name":"val"}}},"RegExp":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"RegExp"},"looseIdentical":{"__symbolic":"function","parameters":["a","b"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"a"},"right":{"__symbolic":"reference","name":"b"}},"right":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":366,"character":19},"right":"number"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":366,"character":44},"right":"number"}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"a"}]}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"b"}]}}}},"getMapKey":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"reference","name":"value"}},"normalizeBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"error","message":"Expression form not supported","line":376,"character":8}},"normalizeBool":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"error","message":"Expression form not supported","line":380,"character":8}},"isJsObject":{"__symbolic":"function","parameters":["o"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"o"},"right":null},"right":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":384,"character":24},"right":"function"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":384,"character":50},"right":"object"}}}},"isPrimitive":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isJsObject"},"arguments":[{"__symbolic":"reference","name":"obj"}]}}},"hasConstructor":{"__symbolic":"function","parameters":["value","type"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"value"},"member":"constructor"},"right":{"__symbolic":"reference","name":"type"}}},"escape":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"encodeURI"},"arguments":[{"__symbolic":"reference","name":"s"}]}},"escapeRegExp":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Expression form not supported","line":481,"character":19}}}}
{"__symbolic":"module","version":1,"metadata":{"Type":{"__symbolic":"reference","name":"Function"},"Math":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":3,"context":{"name":"_global"}},"Date":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":3,"context":{"name":"_global"}},"isPresent":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBoolean":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":104,"character":8},"right":"boolean"}},"isNumber":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":108,"character":8},"right":"number"}},"isString":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":112,"character":8},"right":"string"}},"isFunction":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":116,"character":8},"right":"function"}},"isType":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isFunction"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":124,"character":8},"right":"object"},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isStrictStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isStringMap"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"error","message":"Reference to a local symbol","line":127,"character":5,"context":{"name":"STRING_MAP_PROTO"}}}}},"isPromise":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isPresent"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isFunction"},"arguments":[{"__symbolic":"select","expression":{"__symbolic":"reference","name":"obj"},"member":"then"}]}}},"isArray":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Array"},"member":"isArray"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isDate":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"Date"}},"right":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"obj"},"member":"valueOf"}}]}}}},"serializeEnum":{"__symbolic":"function","parameters":["val"],"value":{"__symbolic":"reference","name":"val"}},"deserializeEnum":{"__symbolic":"function","parameters":["val","values"],"value":{"__symbolic":"reference","name":"val"}},"resolveEnumToken":{"__symbolic":"function","parameters":["enumValue","val"],"value":{"__symbolic":"index","expression":{"__symbolic":"reference","name":"enumValue"},"index":{"__symbolic":"reference","name":"val"}}},"RegExp":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":3,"context":{"name":"_global"}},"looseIdentical":{"__symbolic":"function","parameters":["a","b"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"a"},"right":{"__symbolic":"reference","name":"b"}},"right":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":322,"character":19},"right":"number"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":322,"character":44},"right":"number"}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"a"}]}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"b"}]}}}},"getMapKey":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"reference","name":"value"}},"normalizeBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"if","condition":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isBlank"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"thenExpression":null,"elseExpression":{"__symbolic":"reference","name":"obj"}}},"normalizeBool":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"if","condition":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isBlank"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"thenExpression":false,"elseExpression":{"__symbolic":"reference","name":"obj"}}},"isJsObject":{"__symbolic":"function","parameters":["o"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"o"},"right":null},"right":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":340,"character":24},"right":"function"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":340,"character":50},"right":"object"}}}},"isPrimitive":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isJsObject"},"arguments":[{"__symbolic":"reference","name":"obj"}]}}},"hasConstructor":{"__symbolic":"function","parameters":["value","type"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"value"},"member":"constructor"},"right":{"__symbolic":"reference","name":"type"}}},"escape":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":3,"context":{"name":"_global"}}},"escapeRegExp":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Expression form not supported","line":437,"character":19}}}}

@@ -17,3 +17,2 @@ /**

var lang_1 = require('../facade/lang');
var promise_1 = require('../facade/promise');
/**

@@ -37,6 +36,6 @@ * An implementation of XHR that uses a template cache to avoid doing an actual

if (this._cache.hasOwnProperty(url)) {
return promise_1.PromiseWrapper.resolve(this._cache[url]);
return Promise.resolve(this._cache[url]);
}
else {
return promise_1.PromiseWrapper.reject('CachedXHR: Did not find cached template for ' + url, null);
return Promise.reject('CachedXHR: Did not find cached template for ' + url);
}

@@ -43,0 +42,0 @@ };

@@ -0,1 +1,7 @@

"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
/**

@@ -8,11 +14,5 @@ * @license

*/
"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var compiler_1 = require('@angular/compiler');
var core_1 = require('@angular/core');
var lang_1 = require('../facade/lang');
var promise_1 = require('../facade/promise');
var XHRImpl = (function (_super) {

@@ -24,3 +24,8 @@ __extends(XHRImpl, _super);

XHRImpl.prototype.get = function (url) {
var completer = promise_1.PromiseWrapper.completer();
var resolve;
var reject;
var promise = new Promise(function (res, rej) {
resolve = res;
reject = rej;
});
var xhr = new XMLHttpRequest();

@@ -42,12 +47,16 @@ xhr.open('GET', url, true);

if (200 <= status && status <= 300) {
completer.resolve(response);
resolve(response);
}
else {
completer.reject("Failed to load " + url, null);
reject("Failed to load " + url);
}
};
xhr.onerror = function () { completer.reject("Failed to load " + url, null); };
xhr.onerror = function () { reject("Failed to load " + url); };
xhr.send();
return completer.promise;
return promise;
};
/** @nocollapse */
XHRImpl.decorators = [
{ type: core_1.Injectable },
];
return XHRImpl;

@@ -54,0 +63,0 @@ }(compiler_1.XHR));

@@ -0,13 +1,21 @@

import { PlatformRef } from '@angular/core';
export * from './private_export_testing';
/**
* Default platform providers for testing.
* @experimental API related to bootstrapping are still under review.
*/
export declare const platformBrowserDynamicTesting: (extraProviders?: any[]) => PlatformRef;
/**
* NgModule for testing.
*
* @stable
*/
export declare class BrowserDynamicTestingModule {
}
/**
* @deprecated Use initTestEnvironment with platformBrowserDynamicTesting instead.
*/
export declare const TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS: Array<any>;
/**
* Default application providers for testing.
*
* @stable
* @deprecated Use initTestEnvironment with BrowserDynamicTestingModule instead.
*/
export declare const TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS: Array<any>;

@@ -14,27 +14,62 @@ /**

var testing_1 = require('@angular/compiler/testing');
var core_1 = require('@angular/core');
var testing_2 = require('@angular/core/testing');
var testing_3 = require('@angular/platform-browser/testing');
var index_1 = require('./index');
var core_private_1 = require('./core_private');
var platform_providers_1 = require('./src/platform_providers');
var dom_test_component_renderer_1 = require('./testing/dom_test_component_renderer');
__export(require('./private_export_testing'));
/**
* Default platform providers for testing.
*
* @stable
* @experimental API related to bootstrapping are still under review.
*/
exports.TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS = [testing_3.TEST_BROWSER_PLATFORM_PROVIDERS];
exports.platformBrowserDynamicTesting = core_1.createPlatformFactory(testing_1.platformCoreDynamicTesting, 'browserDynamicTesting', platform_providers_1.INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS);
var BrowserDynamicTestingModule = (function () {
function BrowserDynamicTestingModule() {
}
/** @nocollapse */
BrowserDynamicTestingModule.decorators = [
{ type: core_1.NgModule, args: [{
exports: [testing_3.BrowserTestingModule],
providers: [
{ provide: testing_2.TestComponentBuilder, useClass: testing_1.OverridingTestComponentBuilder },
{ provide: testing_2.TestComponentRenderer, useClass: dom_test_component_renderer_1.DOMTestComponentRenderer },
]
},] },
];
return BrowserDynamicTestingModule;
}());
exports.BrowserDynamicTestingModule = BrowserDynamicTestingModule;
/**
* Default application providers for testing.
*
* @stable
* @deprecated Use initTestEnvironment with platformBrowserDynamicTesting instead.
*/
exports.TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS = [
testing_3.TEST_BROWSER_APPLICATION_PROVIDERS, index_1.BROWSER_APP_COMPILER_PROVIDERS,
[
{ provide: testing_2.TestComponentBuilder, useClass: testing_1.OverridingTestComponentBuilder },
{ provide: compiler_1.DirectiveResolver, useClass: testing_1.MockDirectiveResolver },
{ provide: compiler_1.ViewResolver, useClass: testing_1.MockViewResolver },
{ provide: testing_2.TestComponentRenderer, useClass: dom_test_component_renderer_1.DOMTestComponentRenderer },
]
];
exports.TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS =
// Note: This is not a real provider but a hack to still support the deprecated
// `setBaseTestProviders` method!
[function (appProviders) {
var deprecatedConfiguration = compiler_1.analyzeAppProvidersForDeprecatedConfiguration(appProviders);
var platformRef = core_1.createPlatformFactory(exports.platformBrowserDynamicTesting, 'browserDynamicTestingDeprecated', [{
provide: core_1.COMPILER_OPTIONS,
useValue: deprecatedConfiguration.compilerOptions,
multi: true
}])();
var DynamicTestModule = (function () {
function DynamicTestModule() {
}
/** @nocollapse */
DynamicTestModule.decorators = [
{ type: core_1.NgModule, args: [{
exports: [BrowserDynamicTestingModule],
declarations: [deprecatedConfiguration.moduleDeclarations]
},] },
];
return DynamicTestModule;
}());
var testInjector = testing_2.TestBed.initTestEnvironment(DynamicTestModule, platformRef);
var console = testInjector.get(core_private_1.Console);
deprecatedConfiguration.deprecationMessages.forEach(function (msg) { return console.warn(msg); });
}];
/**
* @deprecated Use initTestEnvironment with BrowserDynamicTestingModule instead.
*/
exports.TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS = [];
//# sourceMappingURL=testing.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS":[{"__symbolic":"reference","module":"@angular/platform-browser/testing","name":"TEST_BROWSER_PLATFORM_PROVIDERS"}],"TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS":[{"__symbolic":"reference","module":"@angular/platform-browser/testing","name":"TEST_BROWSER_APPLICATION_PROVIDERS"},{"__symbolic":"reference","module":"./index","name":"BROWSER_APP_COMPILER_PROVIDERS"},[{"provide":{"__symbolic":"reference","module":"@angular/core/testing","name":"TestComponentBuilder"},"useClass":{"__symbolic":"reference","module":"@angular/compiler/testing","name":"OverridingTestComponentBuilder"}},{"provide":{"__symbolic":"reference","module":"@angular/compiler","name":"DirectiveResolver"},"useClass":{"__symbolic":"reference","module":"@angular/compiler/testing","name":"MockDirectiveResolver"}},{"provide":{"__symbolic":"reference","module":"@angular/compiler","name":"ViewResolver"},"useClass":{"__symbolic":"reference","module":"@angular/compiler/testing","name":"MockViewResolver"}},{"provide":{"__symbolic":"reference","module":"@angular/core/testing","name":"TestComponentRenderer"},"useClass":{"__symbolic":"reference","module":"./testing/dom_test_component_renderer","name":"DOMTestComponentRenderer"}}]]}}
{"__symbolic":"module","version":1,"metadata":{"platformBrowserDynamicTesting":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"createPlatformFactory"},"arguments":[{"__symbolic":"reference","module":"@angular/compiler/testing","name":"platformCoreDynamicTesting"},"browserDynamicTesting",{"__symbolic":"reference","module":"./src/platform_providers","name":"INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS"}]},"BrowserDynamicTestingModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"exports":[{"__symbolic":"reference","module":"@angular/platform-browser/testing","name":"BrowserTestingModule"}],"providers":[{"provide":{"__symbolic":"reference","module":"@angular/core/testing","name":"TestComponentBuilder"},"useClass":{"__symbolic":"reference","module":"@angular/compiler/testing","name":"OverridingTestComponentBuilder"}},{"provide":{"__symbolic":"reference","module":"@angular/core/testing","name":"TestComponentRenderer"},"useClass":{"__symbolic":"reference","module":"./testing/dom_test_component_renderer","name":"DOMTestComponentRenderer"}}]}]}]},"TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS":{"__symbolic":"error","message":"Function call not supported","line":48,"character":5},"TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS":[]},"exports":[{"from":"./private_export_testing"}]}

@@ -0,10 +1,3 @@

import { TestComponentRenderer } from '@angular/core/testing';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { TestComponentRenderer } from '@angular/compiler/testing';
/**
* A DOM based implementation of the TestComponentRenderer.

@@ -11,0 +4,0 @@ */

@@ -14,4 +14,4 @@ /**

};
var testing_1 = require('@angular/compiler/testing');
var core_1 = require('@angular/core');
var testing_1 = require('@angular/core/testing');
var platform_browser_1 = require('@angular/platform-browser');

@@ -18,0 +18,0 @@ var platform_browser_private_1 = require('../platform_browser_private');

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc