@angular/core
Advanced tools
Comparing version 2.0.0 to 2.0.1
/** | ||
* @license Angular v2.0.0 | ||
* @license Angular v2.0.1 | ||
* (c) 2010-2016 Google, Inc. https://angular.io/ | ||
@@ -108,43 +108,8 @@ * License: MIT | ||
/** | ||
* @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 globalScope; | ||
if (typeof window === 'undefined') { | ||
if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) { | ||
// TODO: Replace any with WorkerGlobalScope from lib.webworker.d.ts #3492 | ||
globalScope = self; | ||
} | ||
else { | ||
globalScope = global; | ||
} | ||
} | ||
else { | ||
globalScope = window; | ||
} | ||
function scheduleMicroTask(fn) { | ||
Zone.current.scheduleMicroTask('scheduleMicrotask', fn); | ||
} | ||
// Need to declare a new variable for global here since TypeScript | ||
// exports the original value of the symbol. | ||
var global$1 = globalScope; | ||
// TODO: remove calls to assert in production environment | ||
// Note: Can't just export this and import in in other files | ||
// as `assert` is a reserved keyword in Dart | ||
global$1.assert = function assert(condition) { | ||
// TODO: to be fixed properly via #2830, noop for now | ||
}; | ||
function isPresent(obj) { | ||
return obj !== undefined && obj !== null; | ||
} | ||
function isBlank(obj) { | ||
return obj === undefined || obj === null; | ||
} | ||
function isArray(obj) { | ||
return Array.isArray(obj); | ||
} | ||
function stringify(token) { | ||
@@ -208,9 +173,2 @@ if (typeof token === 'string') { | ||
}()); | ||
var FunctionWrapper = (function () { | ||
function FunctionWrapper() { | ||
} | ||
FunctionWrapper.apply = function (fn, posArgs) { return fn.apply(null, posArgs); }; | ||
FunctionWrapper.bind = function (fn, scope) { return fn.bind(scope); }; | ||
return FunctionWrapper; | ||
}()); | ||
@@ -520,224 +478,2 @@ /** | ||
var Map$1 = global$1.Map; | ||
var Set = global$1.Set; | ||
// Safari and Internet Explorer do not support the iterable parameter to the | ||
// Map constructor. We work around that by manually adding the items. | ||
var createMapFromPairs = (function () { | ||
try { | ||
if (new Map$1([[1, 2]]).size === 1) { | ||
return function createMapFromPairs(pairs) { return new Map$1(pairs); }; | ||
} | ||
} | ||
catch (e) { | ||
} | ||
return function createMapAndPopulateFromPairs(pairs) { | ||
var map = new Map$1(); | ||
for (var i = 0; i < pairs.length; i++) { | ||
var pair = pairs[i]; | ||
map.set(pair[0], pair[1]); | ||
} | ||
return map; | ||
}; | ||
})(); | ||
var createMapFromMap = (function () { | ||
try { | ||
if (new Map$1(new Map$1())) { | ||
return function createMapFromMap(m) { return new Map$1(m); }; | ||
} | ||
} | ||
catch (e) { | ||
} | ||
return function createMapAndPopulateFromMap(m) { | ||
var map = new Map$1(); | ||
m.forEach(function (v, k) { map.set(k, v); }); | ||
return map; | ||
}; | ||
})(); | ||
var _clearValues = (function () { | ||
if ((new Map$1()).keys().next) { | ||
return function _clearValues(m) { | ||
var keyIterator = m.keys(); | ||
var k; | ||
while (!((k = keyIterator.next()).done)) { | ||
m.set(k.value, null); | ||
} | ||
}; | ||
} | ||
else { | ||
return function _clearValuesWithForeEach(m) { | ||
m.forEach(function (v, k) { m.set(k, null); }); | ||
}; | ||
} | ||
})(); | ||
// Safari doesn't implement MapIterator.next(), which is used is Traceur's polyfill of Array.from | ||
// TODO(mlaval): remove the work around once we have a working polyfill of Array.from | ||
var _arrayFromMap = (function () { | ||
try { | ||
if ((new Map$1()).values().next) { | ||
return function createArrayFromMap(m, getValues) { | ||
return getValues ? Array.from(m.values()) : Array.from(m.keys()); | ||
}; | ||
} | ||
} | ||
catch (e) { | ||
} | ||
return function createArrayFromMapWithForeach(m, getValues) { | ||
var res = ListWrapper.createFixedSize(m.size), i = 0; | ||
m.forEach(function (v, k) { | ||
res[i] = getValues ? v : k; | ||
i++; | ||
}); | ||
return res; | ||
}; | ||
})(); | ||
var ListWrapper = (function () { | ||
function ListWrapper() { | ||
} | ||
// JS has no way to express a statically fixed size list, but dart does so we | ||
// keep both methods. | ||
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) { | ||
if (!array) | ||
return null; | ||
return array[0]; | ||
}; | ||
ListWrapper.last = function (array) { | ||
if (!array || array.length == 0) | ||
return null; | ||
return array[array.length - 1]; | ||
}; | ||
ListWrapper.indexOf = function (array, value, startIndex) { | ||
if (startIndex === void 0) { startIndex = 0; } | ||
return 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]; | ||
list.splice(index, 1); | ||
return 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); | ||
if (index > -1) { | ||
list.splice(index, 1); | ||
return true; | ||
} | ||
return false; | ||
}; | ||
ListWrapper.clear = function (list) { list.length = 0; }; | ||
ListWrapper.isEmpty = function (list) { return list.length == 0; }; | ||
ListWrapper.fill = function (list, value, start, end) { | ||
if (start === void 0) { start = 0; } | ||
if (end === void 0) { end = null; } | ||
list.fill(value, start, end === null ? list.length : end); | ||
}; | ||
ListWrapper.equals = function (a, b) { | ||
if (a.length != b.length) | ||
return false; | ||
for (var i = 0; i < a.length; ++i) { | ||
if (a[i] !== b[i]) | ||
return false; | ||
} | ||
return true; | ||
}; | ||
ListWrapper.slice = function (l, from, to) { | ||
if (from === void 0) { from = 0; } | ||
if (to === void 0) { to = null; } | ||
return l.slice(from, to === null ? undefined : to); | ||
}; | ||
ListWrapper.splice = function (l, from, length) { return l.splice(from, length); }; | ||
ListWrapper.sort = function (l, compareFn) { | ||
if (isPresent(compareFn)) { | ||
l.sort(compareFn); | ||
} | ||
else { | ||
l.sort(); | ||
} | ||
}; | ||
ListWrapper.toString = function (l) { return l.toString(); }; | ||
ListWrapper.toJSON = function (l) { return JSON.stringify(l); }; | ||
ListWrapper.maximum = function (list, predicate) { | ||
if (list.length == 0) { | ||
return null; | ||
} | ||
var solution = null; | ||
var maxValue = -Infinity; | ||
for (var index = 0; index < list.length; index++) { | ||
var candidate = list[index]; | ||
if (isBlank(candidate)) { | ||
continue; | ||
} | ||
var candidateValue = predicate(candidate); | ||
if (candidateValue > maxValue) { | ||
solution = candidate; | ||
maxValue = candidateValue; | ||
} | ||
} | ||
return solution; | ||
}; | ||
ListWrapper.flatten = function (list) { | ||
var target = []; | ||
_flattenArray(list, target); | ||
return target; | ||
}; | ||
ListWrapper.addAll = function (list, source) { | ||
for (var i = 0; i < source.length; i++) { | ||
list.push(source[i]); | ||
} | ||
}; | ||
return ListWrapper; | ||
}()); | ||
function _flattenArray(source, target) { | ||
if (isPresent(source)) { | ||
for (var i = 0; i < source.length; i++) { | ||
var item = source[i]; | ||
if (isArray(item)) { | ||
_flattenArray(item, target); | ||
} | ||
else { | ||
target.push(item); | ||
} | ||
} | ||
} | ||
return target; | ||
} | ||
// Safari and Internet Explorer do not support the iterable parameter to the | ||
// Set constructor. We work around that by manually adding the items. | ||
var createSetFromList = (function () { | ||
var test = new Set([1, 2, 3]); | ||
if (test.size === 3) { | ||
return function createSetFromList(lst) { return new Set(lst); }; | ||
} | ||
else { | ||
return function createSetAndPopulateFromList(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; | ||
}; | ||
} | ||
})(); | ||
/** | ||
@@ -883,3 +619,9 @@ * @license | ||
/** | ||
* @experimental | ||
* @whatItDoes Configures and initializes environment for unit testing and provides methods for | ||
* creating components and services in unit tests. | ||
* @description | ||
* | ||
* TestBed is the primary api for writing unit tests for Angular applications and libraries. | ||
* | ||
* @stable | ||
*/ | ||
@@ -920,3 +662,3 @@ var TestBed = (function () { | ||
var testBed = getTestBed(); | ||
getTestBed().initTestEnvironment(ngModule, platform); | ||
testBed.initTestEnvironment(ngModule, platform); | ||
return testBed; | ||
@@ -1033,13 +775,14 @@ }; | ||
if (moduleDef.providers) { | ||
this._providers = ListWrapper.concat(this._providers, moduleDef.providers); | ||
(_a = this._providers).push.apply(_a, moduleDef.providers); | ||
} | ||
if (moduleDef.declarations) { | ||
this._declarations = ListWrapper.concat(this._declarations, moduleDef.declarations); | ||
(_b = this._declarations).push.apply(_b, moduleDef.declarations); | ||
} | ||
if (moduleDef.imports) { | ||
this._imports = ListWrapper.concat(this._imports, moduleDef.imports); | ||
(_c = this._imports).push.apply(_c, moduleDef.imports); | ||
} | ||
if (moduleDef.schemas) { | ||
this._schemas = ListWrapper.concat(this._schemas, moduleDef.schemas); | ||
(_d = this._schemas).push.apply(_d, moduleDef.schemas); | ||
} | ||
var _a, _b, _c, _d; | ||
}; | ||
@@ -1127,3 +870,3 @@ TestBed.prototype.compileComponents = function () { | ||
var params = tokens.map(function (t) { return _this.get(t); }); | ||
return FunctionWrapper.apply(fn, params); | ||
return fn.apply(void 0, params); | ||
}; | ||
@@ -1163,3 +906,3 @@ TestBed.prototype.overrideModule = function (ngModule, override) { | ||
}; | ||
var fixture = ngZone == null ? initComponent() : ngZone.run(initComponent); | ||
var fixture = !ngZone ? initComponent() : ngZone.run(initComponent); | ||
this._activeFixtures.push(fixture); | ||
@@ -1175,6 +918,3 @@ return fixture; | ||
function getTestBed() { | ||
if (_testBed == null) { | ||
_testBed = new TestBed(); | ||
} | ||
return _testBed; | ||
return _testBed = _testBed || new TestBed(); | ||
} | ||
@@ -1259,6 +999,6 @@ /** | ||
var _global$1 = (typeof window === 'undefined' ? global : window); | ||
var _global$2 = (typeof window === 'undefined' ? global : window); | ||
// Reset the test providers and the fake async zone before each test. | ||
if (_global$1.beforeEach) { | ||
_global$1.beforeEach(function () { | ||
if (_global$2.beforeEach) { | ||
_global$2.beforeEach(function () { | ||
TestBed.resetTestingModule(); | ||
@@ -1265,0 +1005,0 @@ resetFakeAsyncZone(); |
{ | ||
"name": "@angular/core", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Angular - the core framework", | ||
@@ -5,0 +5,0 @@ "main": "bundles/core.umd.js", |
@@ -8,3 +8,3 @@ /** | ||
*/ | ||
import { ListWrapper, Map, StringMapWrapper } from '../facade/collection'; | ||
import { StringMapWrapper } from '../facade/collection'; | ||
import { isPresent } from '../facade/lang'; | ||
@@ -47,7 +47,7 @@ export var ViewAnimationMap = (function () { | ||
var playersByAnimation = this._map.get(element); | ||
if (isPresent(playersByAnimation)) { | ||
if (playersByAnimation) { | ||
var player = playersByAnimation[animationName]; | ||
delete playersByAnimation[animationName]; | ||
var index = this._allPlayers.indexOf(player); | ||
ListWrapper.removeAt(this._allPlayers, index); | ||
this._allPlayers.splice(index, 1); | ||
if (StringMapWrapper.isEmpty(playersByAnimation)) { | ||
@@ -54,0 +54,0 @@ this._map.delete(element); |
@@ -8,3 +8,3 @@ /** | ||
*/ | ||
import { isPromise } from '../src/facade/lang'; | ||
import { isPromise } from '../src/util/lang'; | ||
import { Inject, Injectable, OpaqueToken, Optional } from './di'; | ||
@@ -11,0 +11,0 @@ /** |
@@ -16,3 +16,4 @@ /** | ||
import { unimplemented } from '../src/facade/errors'; | ||
import { isBlank, isPresent, isPromise, stringify } from '../src/facade/lang'; | ||
import { stringify } from '../src/facade/lang'; | ||
import { isPromise } from '../src/util/lang'; | ||
import { ApplicationInitStatus } from './application_init'; | ||
@@ -66,3 +67,3 @@ import { APP_BOOTSTRAP_LISTENER, PLATFORM_INITIALIZER } from './application_tokens'; | ||
export function createPlatform(injector) { | ||
if (isPresent(_platform) && !_platform.destroyed) { | ||
if (_platform && !_platform.destroyed) { | ||
throw new Error('There can be only one platform. Destroy the previous one to create a new one.'); | ||
@@ -72,3 +73,3 @@ } | ||
var inits = injector.get(PLATFORM_INITIALIZER, null); | ||
if (isPresent(inits)) | ||
if (inits) | ||
inits.forEach(function (init) { return init(); }); | ||
@@ -106,6 +107,6 @@ return _platform; | ||
var platform = getPlatform(); | ||
if (isBlank(platform)) { | ||
if (!platform) { | ||
throw new Error('No platform exists!'); | ||
} | ||
if (isPresent(platform) && isBlank(platform.injector.get(requiredToken, null))) { | ||
if (!platform.injector.get(requiredToken, null)) { | ||
throw new Error('A platform with a different configuration has been created. Please destroy it first.'); | ||
@@ -121,3 +122,3 @@ } | ||
export function destroyPlatform() { | ||
if (isPresent(_platform) && !_platform.destroyed) { | ||
if (_platform && !_platform.destroyed) { | ||
_platform.destroy(); | ||
@@ -132,3 +133,3 @@ } | ||
export function getPlatform() { | ||
return isPresent(_platform) && !_platform.destroyed ? _platform : null; | ||
return _platform && !_platform.destroyed ? _platform : null; | ||
} | ||
@@ -220,5 +221,3 @@ /** | ||
} | ||
else { | ||
return result; | ||
} | ||
return result; | ||
} | ||
@@ -255,4 +254,4 @@ catch (e) { | ||
} | ||
ListWrapper.clone(this._modules).forEach(function (app) { return app.destroy(); }); | ||
this._destroyListeners.forEach(function (dispose) { return dispose(); }); | ||
this._modules.slice().forEach(function (module) { return module.destroy(); }); | ||
this._destroyListeners.forEach(function (listener) { return listener(); }); | ||
this._destroyed = true; | ||
@@ -299,3 +298,3 @@ }; | ||
var compilerFactory = this.injector.get(CompilerFactory); | ||
var compiler = compilerFactory.createCompiler(compilerOptions instanceof Array ? compilerOptions : [compilerOptions]); | ||
var compiler = compilerFactory.createCompiler(Array.isArray(compilerOptions) ? compilerOptions : [compilerOptions]); | ||
// ugly internal api hack: generate host component factories for all declared components and | ||
@@ -412,3 +411,3 @@ // pass the factories into the callback - this is used by UpdateAdapter to get hold of all | ||
var testability = compRef.injector.get(Testability, null); | ||
if (isPresent(testability)) { | ||
if (testability) { | ||
compRef.injector.get(TestabilityRegistry) | ||
@@ -435,3 +434,3 @@ .registerApplication(compRef.location.nativeElement, testability); | ||
ApplicationRef_.prototype._unloadComponent = function (componentRef) { | ||
if (!ListWrapper.contains(this._rootComponents, componentRef)) { | ||
if (this._rootComponents.indexOf(componentRef) == -1) { | ||
return; | ||
@@ -446,3 +445,3 @@ } | ||
} | ||
var s = ApplicationRef_._tickScope(); | ||
var scope = ApplicationRef_._tickScope(); | ||
try { | ||
@@ -457,3 +456,3 @@ this._runningTick = true; | ||
this._runningTick = false; | ||
wtfLeave(s); | ||
wtfLeave(scope); | ||
} | ||
@@ -463,3 +462,3 @@ }; | ||
// TODO(alxhub): Dispose of the NgZone. | ||
ListWrapper.clone(this._rootComponents).forEach(function (ref) { return ref.destroy(); }); | ||
this._rootComponents.slice().forEach(function (component) { return component.destroy(); }); | ||
}; | ||
@@ -466,0 +465,0 @@ Object.defineProperty(ApplicationRef_.prototype, "componentTypes", { |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":1,"metadata":{"getPlatform":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"if","condition":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"error","message":"Reference to a local symbol","line":29,"character":4,"context":{"name":"_platform"}},"right":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"error","message":"Reference to a local symbol","line":29,"character":4,"context":{"name":"_platform"}}}},"thenExpression":{"__symbolic":"error","message":"Reference to a local symbol","line":29,"character":4,"context":{"name":"_platform"}},"elseExpression":null}},"PlatformRef_":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./di","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./di","name":"Injector"}]}],"onDestroy":[{"__symbolic":"method"}],"destroy":[{"__symbolic":"method"}],"bootstrapModuleFactory":[{"__symbolic":"method"}],"_bootstrapModuleFactoryWithZone":[{"__symbolic":"method"}],"bootstrapModule":[{"__symbolic":"method"}],"_bootstrapModuleWithZone":[{"__symbolic":"method"}],"_moduleDoBootstrap":[{"__symbolic":"method"}]}},"ApplicationRef_":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./di","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./di","name":"Optional"}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./di","name":"Optional"}}]],"parameters":[{"__symbolic":"reference","module":"./zone/ng_zone","name":"NgZone"},{"__symbolic":"reference","module":"./console","name":"Console"},{"__symbolic":"reference","module":"./di","name":"Injector"},{"__symbolic":"reference","module":"../src/error_handler","name":"ErrorHandler"},{"__symbolic":"reference","module":"./linker/component_factory_resolver","name":"ComponentFactoryResolver"},{"__symbolic":"reference","module":"./application_init","name":"ApplicationInitStatus"},{"__symbolic":"reference","module":"./testability/testability","name":"TestabilityRegistry"},{"__symbolic":"reference","module":"./testability/testability","name":"Testability"}]}],"registerChangeDetector":[{"__symbolic":"method"}],"unregisterChangeDetector":[{"__symbolic":"method"}],"bootstrap":[{"__symbolic":"method"}],"_loadComponent":[{"__symbolic":"method"}],"_unloadComponent":[{"__symbolic":"method"}],"tick":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]},"statics":{"_tickScope":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./profile/profile","name":"wtfCreateScope"},"arguments":["ApplicationRef#tick()"]}}}}} | ||
{"__symbolic":"module","version":1,"metadata":{"getPlatform":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"if","condition":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"error","message":"Reference to a local symbol","line":30,"character":4,"context":{"name":"_platform"}},"right":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"error","message":"Reference to a local symbol","line":30,"character":4,"context":{"name":"_platform"}}}},"thenExpression":{"__symbolic":"error","message":"Reference to a local symbol","line":30,"character":4,"context":{"name":"_platform"}},"elseExpression":null}},"PlatformRef_":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./di","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./di","name":"Injector"}]}],"onDestroy":[{"__symbolic":"method"}],"destroy":[{"__symbolic":"method"}],"bootstrapModuleFactory":[{"__symbolic":"method"}],"_bootstrapModuleFactoryWithZone":[{"__symbolic":"method"}],"bootstrapModule":[{"__symbolic":"method"}],"_bootstrapModuleWithZone":[{"__symbolic":"method"}],"_moduleDoBootstrap":[{"__symbolic":"method"}]}},"ApplicationRef_":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./di","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./di","name":"Optional"}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./di","name":"Optional"}}]],"parameters":[{"__symbolic":"reference","module":"./zone/ng_zone","name":"NgZone"},{"__symbolic":"reference","module":"./console","name":"Console"},{"__symbolic":"reference","module":"./di","name":"Injector"},{"__symbolic":"reference","module":"../src/error_handler","name":"ErrorHandler"},{"__symbolic":"reference","module":"./linker/component_factory_resolver","name":"ComponentFactoryResolver"},{"__symbolic":"reference","module":"./application_init","name":"ApplicationInitStatus"},{"__symbolic":"reference","module":"./testability/testability","name":"TestabilityRegistry"},{"__symbolic":"reference","module":"./testability/testability","name":"Testability"}]}],"registerChangeDetector":[{"__symbolic":"method"}],"unregisterChangeDetector":[{"__symbolic":"method"}],"bootstrap":[{"__symbolic":"method"}],"_loadComponent":[{"__symbolic":"method"}],"_unloadComponent":[{"__symbolic":"method"}],"tick":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]},"statics":{"_tickScope":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./profile/profile","name":"wtfCreateScope"},"arguments":["ApplicationRef#tick()"]}}}}} |
@@ -31,3 +31,3 @@ /** | ||
useFactory: _appIdRandomProviderFactory, | ||
deps: [] | ||
deps: [], | ||
}; | ||
@@ -34,0 +34,0 @@ function _randomChar() { |
@@ -39,2 +39,3 @@ /** | ||
import * as decorators from './util/decorators'; | ||
import { isPromise } from './util/lang'; | ||
export declare var __core_private__: { | ||
@@ -137,2 +138,3 @@ isDefaultChangeDetectionStrategy: typeof constants.isDefaultChangeDetectionStrategy; | ||
ComponentStillLoadingError: typeof ComponentStillLoadingError; | ||
isPromise: typeof isPromise; | ||
}; |
@@ -38,2 +38,3 @@ /** | ||
import * as decorators from './util/decorators'; | ||
import { isPromise } from './util/lang'; | ||
export var __core_private__ = { | ||
@@ -104,4 +105,5 @@ isDefaultChangeDetectionStrategy: constants.isDefaultChangeDetectionStrategy, | ||
FILL_STYLE_FLAG: FILL_STYLE_FLAG_, | ||
ComponentStillLoadingError: ComponentStillLoadingError | ||
ComponentStillLoadingError: ComponentStillLoadingError, | ||
isPromise: isPromise | ||
}; | ||
//# sourceMappingURL=core_private_export.js.map |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":1,"metadata":{"___core_private__":{"isDefaultChangeDetectionStrategy":{"__symbolic":"reference","module":"./change_detection/constants","name":"isDefaultChangeDetectionStrategy"},"ChangeDetectorStatus":{"__symbolic":"reference","module":"./change_detection/constants","name":"ChangeDetectorStatus"},"CHANGE_DETECTION_STRATEGY_VALUES":{"__symbolic":"reference","module":"./change_detection/constants","name":"CHANGE_DETECTION_STRATEGY_VALUES"},"constructDependencies":{"__symbolic":"reference","module":"./di/reflective_provider","name":"constructDependencies"},"LifecycleHooks":{"__symbolic":"reference","module":"./metadata/lifecycle_hooks","name":"LifecycleHooks"},"LIFECYCLE_HOOKS_VALUES":{"__symbolic":"reference","module":"./metadata/lifecycle_hooks","name":"LIFECYCLE_HOOKS_VALUES"},"ReflectorReader":{"__symbolic":"reference","module":"./reflection/reflector_reader","name":"ReflectorReader"},"CodegenComponentFactoryResolver":{"__symbolic":"reference","module":"./linker/component_factory_resolver","name":"CodegenComponentFactoryResolver"},"AppElement":{"__symbolic":"reference","module":"./linker/element","name":"AppElement"},"AppView":{"__symbolic":"reference","module":"./linker/view","name":"AppView"},"DebugAppView":{"__symbolic":"reference","module":"./linker/view","name":"DebugAppView"},"NgModuleInjector":{"__symbolic":"reference","module":"./linker/ng_module_factory","name":"NgModuleInjector"},"registerModuleFactory":{"__symbolic":"reference","module":"./linker/ng_module_factory_loader","name":"registerModuleFactory"},"ViewType":{"__symbolic":"reference","module":"./linker/view_type","name":"ViewType"},"MAX_INTERPOLATION_VALUES":{"__symbolic":"reference","module":"./linker/view_utils","name":"MAX_INTERPOLATION_VALUES"},"checkBinding":{"__symbolic":"reference","module":"./linker/view_utils","name":"checkBinding"},"flattenNestedViewRenderNodes":{"__symbolic":"reference","module":"./linker/view_utils","name":"flattenNestedViewRenderNodes"},"interpolate":{"__symbolic":"reference","module":"./linker/view_utils","name":"interpolate"},"ViewUtils":{"__symbolic":"reference","module":"./linker/view_utils","name":"ViewUtils"},"VIEW_ENCAPSULATION_VALUES":{"__symbolic":"reference","module":"./metadata/view","name":"VIEW_ENCAPSULATION_VALUES"},"ViewMetadata":{"__symbolic":"reference","module":"./metadata/view","name":"ViewMetadata"},"DebugContext":{"__symbolic":"reference","module":"./linker/debug_context","name":"DebugContext"},"StaticNodeDebugInfo":{"__symbolic":"reference","module":"./linker/debug_context","name":"StaticNodeDebugInfo"},"devModeEqual":{"__symbolic":"reference","module":"./change_detection/change_detection_util","name":"devModeEqual"},"UNINITIALIZED":{"__symbolic":"reference","module":"./change_detection/change_detection_util","name":"UNINITIALIZED"},"ValueUnwrapper":{"__symbolic":"reference","module":"./change_detection/change_detection_util","name":"ValueUnwrapper"},"RenderDebugInfo":{"__symbolic":"reference","module":"./render/api","name":"RenderDebugInfo"},"TemplateRef_":{"__symbolic":"reference","module":"./linker/template_ref","name":"TemplateRef_"},"ReflectionCapabilities":{"__symbolic":"reference","module":"./reflection/reflection_capabilities","name":"ReflectionCapabilities"},"makeDecorator":{"__symbolic":"reference","module":"./util/decorators","name":"makeDecorator"},"DebugDomRootRenderer":{"__symbolic":"reference","module":"./debug/debug_renderer","name":"DebugDomRootRenderer"},"EMPTY_ARRAY":{"__symbolic":"reference","module":"./linker/view_utils","name":"EMPTY_ARRAY"},"EMPTY_MAP":{"__symbolic":"reference","module":"./linker/view_utils","name":"EMPTY_MAP"},"pureProxy1":{"__symbolic":"reference","module":"./linker/view_utils","name":"pureProxy1"},"pureProxy2":{"__symbolic":"reference","module":"./linker/view_utils","name":"pureProxy2"},"pureProxy3":{"__symbolic":"reference","module":"./linker/view_utils","name":"pureProxy3"},"pureProxy4":{"__symbolic":"reference","module":"./linker/view_utils","name":"pureProxy4"},"pureProxy5":{"__symbolic":"reference","module":"./linker/view_utils","name":"pureProxy5"},"pureProxy6":{"__symbolic":"reference","module":"./linker/view_utils","name":"pureProxy6"},"pureProxy7":{"__symbolic":"reference","module":"./linker/view_utils","name":"pureProxy7"},"pureProxy8":{"__symbolic":"reference","module":"./linker/view_utils","name":"pureProxy8"},"pureProxy9":{"__symbolic":"reference","module":"./linker/view_utils","name":"pureProxy9"},"pureProxy10":{"__symbolic":"reference","module":"./linker/view_utils","name":"pureProxy10"},"castByValue":{"__symbolic":"reference","module":"./linker/view_utils","name":"castByValue"},"Console":{"__symbolic":"reference","module":"./console","name":"Console"},"reflector":{"__symbolic":"reference","module":"./reflection/reflection","name":"reflector"},"Reflector":{"__symbolic":"reference","module":"./reflection/reflection","name":"Reflector"},"NoOpAnimationPlayer":{"__symbolic":"reference","module":"./animation/animation_player","name":"NoOpAnimationPlayer"},"AnimationPlayer":{"__symbolic":"reference","module":"./animation/animation_player","name":"AnimationPlayer"},"AnimationSequencePlayer":{"__symbolic":"reference","module":"./animation/animation_sequence_player","name":"AnimationSequencePlayer"},"AnimationGroupPlayer":{"__symbolic":"reference","module":"./animation/animation_group_player","name":"AnimationGroupPlayer"},"AnimationKeyframe":{"__symbolic":"reference","module":"./animation/animation_keyframe","name":"AnimationKeyframe"},"prepareFinalAnimationStyles":{"__symbolic":"reference","module":"./animation/animation_style_util","name":"prepareFinalAnimationStyles"},"balanceAnimationKeyframes":{"__symbolic":"reference","module":"./animation/animation_style_util","name":"balanceAnimationKeyframes"},"flattenStyles":{"__symbolic":"reference","module":"./animation/animation_style_util","name":"flattenStyles"},"clearStyles":{"__symbolic":"reference","module":"./animation/animation_style_util","name":"clearStyles"},"renderStyles":{"__symbolic":"reference","module":"./animation/animation_style_util","name":"renderStyles"},"collectAndResolveStyles":{"__symbolic":"reference","module":"./animation/animation_style_util","name":"collectAndResolveStyles"},"AnimationStyles":{"__symbolic":"reference","module":"./animation/animation_styles","name":"AnimationStyles"},"AnimationOutput":{"__symbolic":"reference","module":"./animation/animation_output","name":"AnimationOutput"},"ANY_STATE":{"__symbolic":"reference","module":"./animation/animation_constants","name":"ANY_STATE"},"DEFAULT_STATE":{"__symbolic":"reference","module":"./animation/animation_constants","name":"DEFAULT_STATE"},"EMPTY_STATE":{"__symbolic":"reference","module":"./animation/animation_constants","name":"EMPTY_STATE"},"FILL_STYLE_FLAG":{"__symbolic":"reference","module":"./animation/animation_constants","name":"FILL_STYLE_FLAG"},"ComponentStillLoadingError":{"__symbolic":"reference","module":"./linker/compiler","name":"ComponentStillLoadingError"}}}} | ||
{"__symbolic":"module","version":1,"metadata":{"___core_private__":{"isDefaultChangeDetectionStrategy":{"__symbolic":"reference","module":"./change_detection/constants","name":"isDefaultChangeDetectionStrategy"},"ChangeDetectorStatus":{"__symbolic":"reference","module":"./change_detection/constants","name":"ChangeDetectorStatus"},"CHANGE_DETECTION_STRATEGY_VALUES":{"__symbolic":"reference","module":"./change_detection/constants","name":"CHANGE_DETECTION_STRATEGY_VALUES"},"constructDependencies":{"__symbolic":"reference","module":"./di/reflective_provider","name":"constructDependencies"},"LifecycleHooks":{"__symbolic":"reference","module":"./metadata/lifecycle_hooks","name":"LifecycleHooks"},"LIFECYCLE_HOOKS_VALUES":{"__symbolic":"reference","module":"./metadata/lifecycle_hooks","name":"LIFECYCLE_HOOKS_VALUES"},"ReflectorReader":{"__symbolic":"reference","module":"./reflection/reflector_reader","name":"ReflectorReader"},"CodegenComponentFactoryResolver":{"__symbolic":"reference","module":"./linker/component_factory_resolver","name":"CodegenComponentFactoryResolver"},"AppElement":{"__symbolic":"reference","module":"./linker/element","name":"AppElement"},"AppView":{"__symbolic":"reference","module":"./linker/view","name":"AppView"},"DebugAppView":{"__symbolic":"reference","module":"./linker/view","name":"DebugAppView"},"NgModuleInjector":{"__symbolic":"reference","module":"./linker/ng_module_factory","name":"NgModuleInjector"},"registerModuleFactory":{"__symbolic":"reference","module":"./linker/ng_module_factory_loader","name":"registerModuleFactory"},"ViewType":{"__symbolic":"reference","module":"./linker/view_type","name":"ViewType"},"MAX_INTERPOLATION_VALUES":{"__symbolic":"reference","module":"./linker/view_utils","name":"MAX_INTERPOLATION_VALUES"},"checkBinding":{"__symbolic":"reference","module":"./linker/view_utils","name":"checkBinding"},"flattenNestedViewRenderNodes":{"__symbolic":"reference","module":"./linker/view_utils","name":"flattenNestedViewRenderNodes"},"interpolate":{"__symbolic":"reference","module":"./linker/view_utils","name":"interpolate"},"ViewUtils":{"__symbolic":"reference","module":"./linker/view_utils","name":"ViewUtils"},"VIEW_ENCAPSULATION_VALUES":{"__symbolic":"reference","module":"./metadata/view","name":"VIEW_ENCAPSULATION_VALUES"},"ViewMetadata":{"__symbolic":"reference","module":"./metadata/view","name":"ViewMetadata"},"DebugContext":{"__symbolic":"reference","module":"./linker/debug_context","name":"DebugContext"},"StaticNodeDebugInfo":{"__symbolic":"reference","module":"./linker/debug_context","name":"StaticNodeDebugInfo"},"devModeEqual":{"__symbolic":"reference","module":"./change_detection/change_detection_util","name":"devModeEqual"},"UNINITIALIZED":{"__symbolic":"reference","module":"./change_detection/change_detection_util","name":"UNINITIALIZED"},"ValueUnwrapper":{"__symbolic":"reference","module":"./change_detection/change_detection_util","name":"ValueUnwrapper"},"RenderDebugInfo":{"__symbolic":"reference","module":"./render/api","name":"RenderDebugInfo"},"TemplateRef_":{"__symbolic":"reference","module":"./linker/template_ref","name":"TemplateRef_"},"ReflectionCapabilities":{"__symbolic":"reference","module":"./reflection/reflection_capabilities","name":"ReflectionCapabilities"},"makeDecorator":{"__symbolic":"reference","module":"./util/decorators","name":"makeDecorator"},"DebugDomRootRenderer":{"__symbolic":"reference","module":"./debug/debug_renderer","name":"DebugDomRootRenderer"},"EMPTY_ARRAY":{"__symbolic":"reference","module":"./linker/view_utils","name":"EMPTY_ARRAY"},"EMPTY_MAP":{"__symbolic":"reference","module":"./linker/view_utils","name":"EMPTY_MAP"},"pureProxy1":{"__symbolic":"reference","module":"./linker/view_utils","name":"pureProxy1"},"pureProxy2":{"__symbolic":"reference","module":"./linker/view_utils","name":"pureProxy2"},"pureProxy3":{"__symbolic":"reference","module":"./linker/view_utils","name":"pureProxy3"},"pureProxy4":{"__symbolic":"reference","module":"./linker/view_utils","name":"pureProxy4"},"pureProxy5":{"__symbolic":"reference","module":"./linker/view_utils","name":"pureProxy5"},"pureProxy6":{"__symbolic":"reference","module":"./linker/view_utils","name":"pureProxy6"},"pureProxy7":{"__symbolic":"reference","module":"./linker/view_utils","name":"pureProxy7"},"pureProxy8":{"__symbolic":"reference","module":"./linker/view_utils","name":"pureProxy8"},"pureProxy9":{"__symbolic":"reference","module":"./linker/view_utils","name":"pureProxy9"},"pureProxy10":{"__symbolic":"reference","module":"./linker/view_utils","name":"pureProxy10"},"castByValue":{"__symbolic":"reference","module":"./linker/view_utils","name":"castByValue"},"Console":{"__symbolic":"reference","module":"./console","name":"Console"},"reflector":{"__symbolic":"reference","module":"./reflection/reflection","name":"reflector"},"Reflector":{"__symbolic":"reference","module":"./reflection/reflection","name":"Reflector"},"NoOpAnimationPlayer":{"__symbolic":"reference","module":"./animation/animation_player","name":"NoOpAnimationPlayer"},"AnimationPlayer":{"__symbolic":"reference","module":"./animation/animation_player","name":"AnimationPlayer"},"AnimationSequencePlayer":{"__symbolic":"reference","module":"./animation/animation_sequence_player","name":"AnimationSequencePlayer"},"AnimationGroupPlayer":{"__symbolic":"reference","module":"./animation/animation_group_player","name":"AnimationGroupPlayer"},"AnimationKeyframe":{"__symbolic":"reference","module":"./animation/animation_keyframe","name":"AnimationKeyframe"},"prepareFinalAnimationStyles":{"__symbolic":"reference","module":"./animation/animation_style_util","name":"prepareFinalAnimationStyles"},"balanceAnimationKeyframes":{"__symbolic":"reference","module":"./animation/animation_style_util","name":"balanceAnimationKeyframes"},"flattenStyles":{"__symbolic":"reference","module":"./animation/animation_style_util","name":"flattenStyles"},"clearStyles":{"__symbolic":"reference","module":"./animation/animation_style_util","name":"clearStyles"},"renderStyles":{"__symbolic":"reference","module":"./animation/animation_style_util","name":"renderStyles"},"collectAndResolveStyles":{"__symbolic":"reference","module":"./animation/animation_style_util","name":"collectAndResolveStyles"},"AnimationStyles":{"__symbolic":"reference","module":"./animation/animation_styles","name":"AnimationStyles"},"AnimationOutput":{"__symbolic":"reference","module":"./animation/animation_output","name":"AnimationOutput"},"ANY_STATE":{"__symbolic":"reference","module":"./animation/animation_constants","name":"ANY_STATE"},"DEFAULT_STATE":{"__symbolic":"reference","module":"./animation/animation_constants","name":"DEFAULT_STATE"},"EMPTY_STATE":{"__symbolic":"reference","module":"./animation/animation_constants","name":"EMPTY_STATE"},"FILL_STYLE_FLAG":{"__symbolic":"reference","module":"./animation/animation_constants","name":"FILL_STYLE_FLAG"},"ComponentStillLoadingError":{"__symbolic":"reference","module":"./linker/compiler","name":"ComponentStillLoadingError"},"isPromise":{"__symbolic":"reference","module":"./util/lang","name":"isPromise"}}}} |
@@ -31,5 +31,4 @@ export declare const THROW_IF_NOT_FOUND: Object; | ||
* - Returns the `notFoundValue` otherwise | ||
* ``` | ||
*/ | ||
get(token: any, notFoundValue?: any): any; | ||
} |
@@ -53,3 +53,2 @@ /** | ||
* - Returns the `notFoundValue` otherwise | ||
* ``` | ||
*/ | ||
@@ -56,0 +55,0 @@ Injector.prototype.get = function (token, notFoundValue) { return unimplemented(); }; |
@@ -231,4 +231,3 @@ /** | ||
* @whatItDoes Specifies that an injector should retrieve a dependency from any injector until | ||
* reaching the | ||
* host element of the current component. | ||
* reaching the host element of the current component. | ||
* @howToUse | ||
@@ -235,0 +234,0 @@ * ``` |
@@ -115,3 +115,3 @@ /** | ||
var len = providers.length; | ||
this.keyIds = ListWrapper.createFixedSize(len); | ||
this.keyIds = new Array(len); | ||
for (var i = 0; i < len; i++) { | ||
@@ -261,3 +261,3 @@ this.keyIds[i] = providers[i].key.id; | ||
this.injector = injector; | ||
this.objs = ListWrapper.createFixedSize(protoStrategy.providers.length); | ||
this.objs = new Array(protoStrategy.providers.length); | ||
ListWrapper.fill(this.objs, UNDEFINED); | ||
@@ -606,3 +606,3 @@ } | ||
if (provider.multiProvider) { | ||
var res = ListWrapper.createFixedSize(provider.resolvedFactories.length); | ||
var res = new Array(provider.resolvedFactories.length); | ||
for (var i = 0; i < provider.resolvedFactories.length; ++i) { | ||
@@ -609,0 +609,0 @@ res[i] = this._instantiate(provider, provider.resolvedFactories[i]); |
@@ -1,6 +0,2 @@ | ||
export declare var Map: MapConstructor; | ||
export declare var Set: SetConstructor; | ||
export declare class MapWrapper { | ||
static clone<K, V>(m: Map<K, V>): Map<K, V>; | ||
static createFromStringMap<T>(stringMap: { | ||
@@ -13,3 +9,2 @@ [key: string]: T; | ||
static createFromPairs(pairs: any[]): Map<any, any>; | ||
static clearValues(m: Map<any, any>): void; | ||
static iterable<T>(m: T): T; | ||
@@ -23,8 +18,2 @@ static keys<K>(m: Map<K, any>): K[]; | ||
export declare class StringMapWrapper { | ||
static create(): { | ||
[k: string]: any; | ||
}; | ||
static contains(map: { | ||
[key: string]: any; | ||
}, key: string): boolean; | ||
static get<V>(map: { | ||
@@ -45,5 +34,2 @@ [key: string]: V; | ||
}): boolean; | ||
static delete(map: { | ||
[key: string]: any; | ||
}, key: string): void; | ||
static forEach<K, V>(map: { | ||
@@ -50,0 +36,0 @@ [key: string]: V; |
@@ -8,5 +8,3 @@ /** | ||
*/ | ||
import { getSymbolIterator, global, isArray, isBlank, isJsObject, isPresent } from './lang'; | ||
export var Map = global.Map; | ||
export var Set = global.Set; | ||
import { getSymbolIterator, isArray, isBlank, isJsObject, isPresent } from './lang'; | ||
// Safari and Internet Explorer do not support the iterable parameter to the | ||
@@ -74,3 +72,3 @@ // Map constructor. We work around that by manually adding the items. | ||
return function createArrayFromMapWithForeach(m, getValues) { | ||
var res = ListWrapper.createFixedSize(m.size), i = 0; | ||
var res = new Array(m.size), i = 0; | ||
m.forEach(function (v, k) { | ||
@@ -86,3 +84,2 @@ res[i] = getValues ? v : k; | ||
} | ||
MapWrapper.clone = function (m) { return createMapFromMap(m); }; | ||
MapWrapper.createFromStringMap = function (stringMap) { | ||
@@ -101,3 +98,2 @@ var result = new Map(); | ||
MapWrapper.createFromPairs = function (pairs) { return createMapFromPairs(pairs); }; | ||
MapWrapper.clearValues = function (m) { _clearValues(m); }; | ||
MapWrapper.iterable = function (m) { return m; }; | ||
@@ -114,11 +110,2 @@ MapWrapper.keys = function (m) { return _arrayFromMap(m, false); }; | ||
} | ||
StringMapWrapper.create = function () { | ||
// Note: We are not using Object.create(null) here due to | ||
// performance! | ||
// http://jsperf.com/ng2-object-create-null | ||
return {}; | ||
}; | ||
StringMapWrapper.contains = function (map, key) { | ||
return map.hasOwnProperty(key); | ||
}; | ||
StringMapWrapper.get = function (map, key) { | ||
@@ -138,3 +125,2 @@ return map.hasOwnProperty(key) ? map[key] : undefined; | ||
}; | ||
StringMapWrapper.delete = function (map, key) { delete map[key]; }; | ||
StringMapWrapper.forEach = function (map, callback) { | ||
@@ -141,0 +127,0 @@ for (var _i = 0, _a = Object.keys(map); _i < _a.length; _i++) { |
@@ -45,3 +45,2 @@ | ||
export declare function isStrictStringMap(obj: any): boolean; | ||
export declare function isPromise(obj: any): boolean; | ||
export declare function isArray(obj: any): boolean; | ||
@@ -48,0 +47,0 @@ export declare function isDate(obj: any): obj is Date; |
@@ -70,7 +70,2 @@ /** | ||
} | ||
export function isPromise(obj) { | ||
// 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); | ||
} | ||
export function isArray(obj) { | ||
@@ -77,0 +72,0 @@ return Array.isArray(obj); |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":1,"metadata":{"Math":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":4,"context":{"name":"_global"}},"Date":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":4,"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":87,"character":9},"right":"boolean"}},"isNumber":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":91,"character":9},"right":"number"}},"isString":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":95,"character":9},"right":"string"}},"isFunction":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":99,"character":9},"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":107,"character":9},"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":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{}]}}}},"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":4,"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":293,"character":20},"right":"number"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":293,"character":45},"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":311,"character":24},"right":"function"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":311,"character":51},"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":4,"context":{"name":"_global"}}},"escapeRegExp":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Expression form not supported","line":408,"character":19}}}} | ||
{"__symbolic":"module","version":1,"metadata":{"Math":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":4,"context":{"name":"_global"}},"Date":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":4,"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":87,"character":9},"right":"boolean"}},"isNumber":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":91,"character":9},"right":"number"}},"isString":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":95,"character":9},"right":"string"}},"isFunction":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":99,"character":9},"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":107,"character":9},"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":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{}]}}}},"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":4,"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":287,"character":20},"right":"number"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":287,"character":45},"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":305,"character":24},"right":"function"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":305,"character":51},"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":4,"context":{"name":"_global"}}},"escapeRegExp":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Expression form not supported","line":402,"character":19}}}} |
@@ -12,3 +12,2 @@ /** | ||
import { Inject, Injectable } from '../di'; | ||
import { ListWrapper } from '../facade/collection'; | ||
import { isBlank, isPresent, looseIdentical } from '../facade/lang'; | ||
@@ -77,3 +76,3 @@ import { RenderComponentType, RootRenderer } from '../render/api'; | ||
var givenSlotCount = projectableNodes.length; | ||
res = ListWrapper.createFixedSize(expectedSlotCount); | ||
res = new Array(expectedSlotCount); | ||
for (var i = 0; i < expectedSlotCount; i++) { | ||
@@ -80,0 +79,0 @@ res[i] = (i < givenSlotCount) ? projectableNodes[i] : EMPTY_ARR; |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":1,"metadata":{"ViewUtils":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"../di","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"../di","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../application_tokens","name":"APP_ID"}]}],null],"parameters":[{"__symbolic":"reference","module":"../render/api","name":"RootRenderer"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"../security","name":"Sanitizer"}]}],"createRenderComponentType":[{"__symbolic":"method"}],"renderComponent":[{"__symbolic":"method"}]}},"flattenNestedViewRenderNodes":{"__symbolic":"function","parameters":["nodes"],"value":{"__symbolic":"error","message":"Reference to a non-exported function","line":53,"character":9,"context":{"name":"_flattenNestedViewRenderNodes"}}},"MAX_INTERPOLATION_VALUES":9,"castByValue":{"__symbolic":"function","parameters":["input","value"],"value":{"__symbolic":"reference","name":"input"}},"EMPTY_ARRAY":[],"EMPTY_MAP":{}}} | ||
{"__symbolic":"module","version":1,"metadata":{"ViewUtils":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"../di","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"../di","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../application_tokens","name":"APP_ID"}]}],null],"parameters":[{"__symbolic":"reference","module":"../render/api","name":"RootRenderer"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"../security","name":"Sanitizer"}]}],"createRenderComponentType":[{"__symbolic":"method"}],"renderComponent":[{"__symbolic":"method"}]}},"flattenNestedViewRenderNodes":{"__symbolic":"function","parameters":["nodes"],"value":{"__symbolic":"error","message":"Reference to a non-exported function","line":52,"character":9,"context":{"name":"_flattenNestedViewRenderNodes"}}},"MAX_INTERPOLATION_VALUES":9,"castByValue":{"__symbolic":"function","parameters":["input","value"],"value":{"__symbolic":"reference","name":"input"}},"EMPTY_ARRAY":[],"EMPTY_MAP":{}}} |
@@ -0,1 +1,8 @@ | ||
/** | ||
* @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 { OpaqueToken } from '../di/opaque_token'; | ||
@@ -45,51 +52,52 @@ import { Type } from '../type'; | ||
/** | ||
* Specifies that a constant attribute value should be injected. | ||
* | ||
* The directive can inject constant string literals of host element attributes. | ||
* | ||
* ### Example | ||
* | ||
* Suppose we have an `<input>` element and want to know its `type`. | ||
* | ||
* ```html | ||
* <input type="text"> | ||
* ``` | ||
* | ||
* A decorator can inject string literal `text` like so: | ||
* | ||
* {@example core/ts/metadata/metadata.ts region='attributeMetadata'} | ||
* | ||
* ### Example as TypeScript Decorator | ||
* | ||
* {@example core/ts/metadata/metadata.ts region='attributeFactory'} | ||
* | ||
* ### Example as ES5 DSL | ||
* | ||
* ``` | ||
* var MyComponent = ng | ||
* .Component({...}) | ||
* .Class({ | ||
* constructor: [new ng.Attribute('title'), function(title) { | ||
* ... | ||
* }] | ||
* }) | ||
* ``` | ||
* | ||
* ### Example as ES5 annotation | ||
* | ||
* ``` | ||
* var MyComponent = function(title) { | ||
* ... | ||
* }; | ||
* | ||
* MyComponent.annotations = [ | ||
* new ng.Component({...}) | ||
* ] | ||
* MyComponent.parameters = [ | ||
* [new ng.Attribute('title')] | ||
* ] | ||
* ``` | ||
* | ||
* @stable | ||
*/ (name: string): any; | ||
* Specifies that a constant attribute value should be injected. | ||
* | ||
* The directive can inject constant string literals of host element attributes. | ||
* | ||
* ### Example | ||
* | ||
* Suppose we have an `<input>` element and want to know its `type`. | ||
* | ||
* ```html | ||
* <input type="text"> | ||
* ``` | ||
* | ||
* A decorator can inject string literal `text` like so: | ||
* | ||
* {@example core/ts/metadata/metadata.ts region='attributeMetadata'} | ||
* | ||
* ### Example as TypeScript Decorator | ||
* | ||
* {@example core/ts/metadata/metadata.ts region='attributeFactory'} | ||
* | ||
* ### Example as ES5 DSL | ||
* | ||
* ``` | ||
* var MyComponent = ng | ||
* .Component({...}) | ||
* .Class({ | ||
* constructor: [new ng.Attribute('title'), function(title) { | ||
* ... | ||
* }] | ||
* }) | ||
* ``` | ||
* | ||
* ### Example as ES5 annotation | ||
* | ||
* ``` | ||
* var MyComponent = function(title) { | ||
* ... | ||
* }; | ||
* | ||
* MyComponent.annotations = [ | ||
* new ng.Component({...}) | ||
* ] | ||
* MyComponent.parameters = [ | ||
* [new ng.Attribute('title')] | ||
* ] | ||
* ``` | ||
* | ||
* @stable | ||
*/ | ||
(name: string): any; | ||
new (name: string): Attribute; | ||
@@ -330,4 +338,2 @@ } | ||
* | ||
* Let's look at an example!!!!: | ||
* | ||
* {@example core/di/ts/viewChild/view_child_example.ts region='Component'} | ||
@@ -334,0 +340,0 @@ * |
@@ -72,4 +72,8 @@ /** | ||
export var ContentChildren = makePropDecorator('ContentChildren', [ | ||
['selector', undefined], | ||
{ first: false, isViewQuery: false, descendants: false, read: undefined } | ||
['selector', undefined], { | ||
first: false, | ||
isViewQuery: false, | ||
descendants: false, | ||
read: undefined, | ||
} | ||
], Query); | ||
@@ -109,3 +113,3 @@ /** | ||
isViewQuery: false, | ||
descendants: false, | ||
descendants: true, | ||
read: undefined, | ||
@@ -112,0 +116,0 @@ } |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":1,"metadata":{"ANALYZE_FOR_ENTRY_COMPONENTS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"../di/opaque_token","name":"OpaqueToken"},"arguments":["AnalyzeForEntryComponents"]},"Attribute":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"../util/decorators","name":"makeParamDecorator"},"arguments":["Attribute",[["attributeName",{"__symbolic":"reference","name":"undefined"}]]]},"ContentChildren":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"../util/decorators","name":"makePropDecorator"},"arguments":["ContentChildren",[["selector",{"__symbolic":"reference","name":"undefined"}],{"first":false,"isViewQuery":false,"descendants":false,"read":{"__symbolic":"reference","name":"undefined"}}],{"__symbolic":"reference","name":"Query"}]},"ContentChild":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"../util/decorators","name":"makePropDecorator"},"arguments":["ContentChild",[["selector",{"__symbolic":"reference","name":"undefined"}],{"first":true,"isViewQuery":false,"descendants":false,"read":{"__symbolic":"reference","name":"undefined"}}],{"__symbolic":"reference","name":"Query"}]},"ViewChildren":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"../util/decorators","name":"makePropDecorator"},"arguments":["ViewChildren",[["selector",{"__symbolic":"reference","name":"undefined"}],{"first":false,"isViewQuery":true,"descendants":true,"read":{"__symbolic":"reference","name":"undefined"}}],{"__symbolic":"reference","name":"Query"}]},"ViewChild":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"../util/decorators","name":"makePropDecorator"},"arguments":["ViewChild",[["selector",{"__symbolic":"reference","name":"undefined"}],{"first":true,"isViewQuery":true,"descendants":true,"read":{"__symbolic":"reference","name":"undefined"}}],{"__symbolic":"reference","name":"Query"}]}}} | ||
{"__symbolic":"module","version":1,"metadata":{"ANALYZE_FOR_ENTRY_COMPONENTS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"../di/opaque_token","name":"OpaqueToken"},"arguments":["AnalyzeForEntryComponents"]},"Attribute":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"../util/decorators","name":"makeParamDecorator"},"arguments":["Attribute",[["attributeName",{"__symbolic":"reference","name":"undefined"}]]]},"ContentChildren":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"../util/decorators","name":"makePropDecorator"},"arguments":["ContentChildren",[["selector",{"__symbolic":"reference","name":"undefined"}],{"first":false,"isViewQuery":false,"descendants":false,"read":{"__symbolic":"reference","name":"undefined"}}],{"__symbolic":"reference","name":"Query"}]},"ContentChild":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"../util/decorators","name":"makePropDecorator"},"arguments":["ContentChild",[["selector",{"__symbolic":"reference","name":"undefined"}],{"first":true,"isViewQuery":false,"descendants":true,"read":{"__symbolic":"reference","name":"undefined"}}],{"__symbolic":"reference","name":"Query"}]},"ViewChildren":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"../util/decorators","name":"makePropDecorator"},"arguments":["ViewChildren",[["selector",{"__symbolic":"reference","name":"undefined"}],{"first":false,"isViewQuery":true,"descendants":true,"read":{"__symbolic":"reference","name":"undefined"}}],{"__symbolic":"reference","name":"Query"}]},"ViewChild":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"../util/decorators","name":"makePropDecorator"},"arguments":["ViewChild",[["selector",{"__symbolic":"reference","name":"undefined"}],{"first":true,"isViewQuery":true,"descendants":true,"read":{"__symbolic":"reference","name":"undefined"}}],{"__symbolic":"reference","name":"Query"}]}}} |
@@ -432,6 +432,6 @@ /** | ||
* * **entryComponents** - list of components that are dynamically inserted into the view of this | ||
* component | ||
* component | ||
* * **exportAs** - name under which the component instance is exported in a template | ||
* * **host** - map of class property to host element bindings for events, properties and | ||
* attributes | ||
* attributes | ||
* * **inputs** - list of class property names to data-bind as component inputs | ||
@@ -441,3 +441,3 @@ * * **interpolation** - custom interpolation markers used in this component's template | ||
* * **outputs** - list of class property names that expose output events that others can | ||
* subscribe to | ||
* subscribe to | ||
* * **providers** - list of providers available to this component and its children | ||
@@ -632,8 +632,21 @@ * * **queries** - configure queries that can be injected into the component | ||
/** | ||
* Specify how the template and the styles should be encapsulated. | ||
* The default is {@link ViewEncapsulation#Emulated `ViewEncapsulation.Emulated`} if the view | ||
* has styles, | ||
* otherwise {@link ViewEncapsulation#None `ViewEncapsulation.None`}. | ||
* Specifies how the template and the styles should be encapsulated: | ||
* - {@link ViewEncapsulation#Native `ViewEncapsulation.Native`} to use shadow roots - only works | ||
* if natively available on the platform, | ||
* - {@link ViewEncapsulation#Emulated `ViewEncapsulation.Emulated`} to use shimmed CSS that | ||
* emulates the native behavior, | ||
* - {@link ViewEncapsulation#None `ViewEncapsulation.None`} to use global CSS without any | ||
* encapsulation. | ||
* | ||
* When no `encapsulation` is defined for the component, the default value from the | ||
* {@link CompilerConfig} is used. The default is `ViewEncapsulation.Emulated`}. Provide a new | ||
* `CompilerConfig` to override this value. | ||
* | ||
* If the encapsulation is set to `ViewEncapsulation.Emulated` and the component has no `styles` | ||
* nor `styleUrls` the encapsulation will automatically be switched to `ViewEncapsulation.None`. | ||
*/ | ||
encapsulation?: ViewEncapsulation; | ||
/** | ||
* Overrides the default encapsulation start and end delimiters (respectively `{{` and `}}`) | ||
*/ | ||
interpolation?: [string, string]; | ||
@@ -643,4 +656,4 @@ /** | ||
* this component is defined. For each components listed here, | ||
* Angular will create a {@link ComponentFactory ComponentFactory} and store it in the | ||
* {@link ComponentFactoryResolver ComponentFactoryResolver}. | ||
* Angular will create a {@link ComponentFactory} and store it in the | ||
* {@link ComponentFactoryResolver}. | ||
*/ | ||
@@ -647,0 +660,0 @@ entryComponents?: Array<Type<any> | any[]>; |
@@ -41,9 +41,2 @@ /** | ||
* | ||
* Each Angular component requires a single `@Component` and at least one `@View` annotation. The | ||
* `@View` annotation specifies the HTML template to use, and lists the directives that are active | ||
* within the template. | ||
* | ||
* When a component is instantiated, the template is loaded into the component's shadow root, and | ||
* the expressions and statements in the template are evaluated against the component. | ||
* | ||
* For details on the `@Component` annotation, see {@link Component}. | ||
@@ -57,3 +50,2 @@ * | ||
* template: 'Hello {{name}}!', | ||
* directives: [GreetUser, Bold] | ||
* }) | ||
@@ -70,36 +62,19 @@ * class Greet { | ||
* @deprecated Use Component instead. | ||
* | ||
* {@link Component} | ||
*/ | ||
export declare class ViewMetadata { | ||
/** | ||
* Specifies a template URL for an Angular component. | ||
* | ||
* NOTE: Only one of `templateUrl` or `template` can be defined per View. | ||
* | ||
* <!-- TODO: what's the url relative to? --> | ||
*/ | ||
/** {@link Component.templateUrl} */ | ||
templateUrl: string; | ||
/** | ||
* Specifies an inline template for an Angular component. | ||
* | ||
* NOTE: Only one of `templateUrl` or `template` can be defined per View. | ||
*/ | ||
/** {@link Component.template} */ | ||
template: string; | ||
/** | ||
* Specifies stylesheet URLs for an Angular component. | ||
* | ||
* <!-- TODO: what's the url relative to? --> | ||
*/ | ||
/** {@link Component.stylesUrl} */ | ||
styleUrls: string[]; | ||
/** | ||
* Specifies an inline stylesheet for an Angular component. | ||
*/ | ||
/** {@link Component.styles} */ | ||
styles: string[]; | ||
/** | ||
* Specify how the template and the styles should be encapsulated. | ||
* The default is {@link ViewEncapsulation#Emulated `ViewEncapsulation.Emulated`} if the view | ||
* has styles, | ||
* otherwise {@link ViewEncapsulation#None `ViewEncapsulation.None`}. | ||
*/ | ||
/** {@link Component.encapsulation} */ | ||
encapsulation: ViewEncapsulation; | ||
/** {@link Component.animation} */ | ||
animations: AnimationEntryMetadata[]; | ||
/** {@link Component.interpolation} */ | ||
interpolation: [string, string]; | ||
@@ -106,0 +81,0 @@ constructor({templateUrl, template, encapsulation, styles, styleUrls, animations, interpolation}?: { |
@@ -41,9 +41,2 @@ /** | ||
* | ||
* Each Angular component requires a single `@Component` and at least one `@View` annotation. The | ||
* `@View` annotation specifies the HTML template to use, and lists the directives that are active | ||
* within the template. | ||
* | ||
* When a component is instantiated, the template is loaded into the component's shadow root, and | ||
* the expressions and statements in the template are evaluated against the component. | ||
* | ||
* For details on the `@Component` annotation, see {@link Component}. | ||
@@ -57,3 +50,2 @@ * | ||
* template: 'Hello {{name}}!', | ||
* directives: [GreetUser, Bold] | ||
* }) | ||
@@ -70,2 +62,4 @@ * class Greet { | ||
* @deprecated Use Component instead. | ||
* | ||
* {@link Component} | ||
*/ | ||
@@ -72,0 +66,0 @@ export var ViewMetadata = (function () { |
@@ -17,5 +17,8 @@ /** | ||
var _CORE_PLATFORM_PROVIDERS = [ | ||
PlatformRef_, { provide: PlatformRef, useExisting: PlatformRef_ }, | ||
PlatformRef_, | ||
{ provide: PlatformRef, useExisting: PlatformRef_ }, | ||
{ provide: Reflector, useFactory: _reflector, deps: [] }, | ||
{ provide: ReflectorReader, useExisting: Reflector }, TestabilityRegistry, Console | ||
{ provide: ReflectorReader, useExisting: Reflector }, | ||
TestabilityRegistry, | ||
Console, | ||
]; | ||
@@ -22,0 +25,0 @@ /** |
@@ -13,3 +13,3 @@ /** | ||
}; | ||
import { Map, MapWrapper, Set, SetWrapper, StringMapWrapper } from '../facade/collection'; | ||
import { MapWrapper, SetWrapper, StringMapWrapper } from '../facade/collection'; | ||
import { isPresent } from '../facade/lang'; | ||
@@ -38,2 +38,3 @@ import { ReflectorReader } from './reflector_reader'; | ||
_super.call(this); | ||
this.reflectionCapabilities = reflectionCapabilities; | ||
/** @internal */ | ||
@@ -47,4 +48,4 @@ this._injectableInfo = new Map(); | ||
this._methods = new Map(); | ||
/** @internal */ | ||
this._usedKeys = null; | ||
this.reflectionCapabilities = reflectionCapabilities; | ||
} | ||
@@ -51,0 +52,0 @@ Reflector.prototype.updateCapabilities = function (caps) { this.reflectionCapabilities = caps; }; |
@@ -27,2 +27,3 @@ import { NgZone } from '../zone/ng_zone'; | ||
getPendingRequestCount(): number; | ||
/** @deprecated use findProviders */ | ||
findBindings(using: any, provider: string, exactMatch: boolean): any[]; | ||
@@ -29,0 +30,0 @@ findProviders(using: any, provider: string, exactMatch: boolean): any[]; |
@@ -9,3 +9,3 @@ /** | ||
import { Injectable } from '../di'; | ||
import { Map, MapWrapper } from '../facade/collection'; | ||
import { MapWrapper } from '../facade/collection'; | ||
import { scheduleMicroTask } from '../facade/lang'; | ||
@@ -96,2 +96,3 @@ import { NgZone } from '../zone/ng_zone'; | ||
Testability.prototype.getPendingRequestCount = function () { return this._pendingCount; }; | ||
/** @deprecated use findProviders */ | ||
Testability.prototype.findBindings = function (using, provider, exactMatch) { | ||
@@ -98,0 +99,0 @@ // TODO(juliemr): implement. |
@@ -18,5 +18,5 @@ /** | ||
*/ | ||
export declare var Type: FunctionConstructor; | ||
export declare const Type: FunctionConstructor; | ||
export interface Type<T> extends Function { | ||
new (...args: any[]): T; | ||
} |
@@ -45,3 +45,2 @@ | ||
export declare function isStrictStringMap(obj: any): boolean; | ||
export declare function isPromise(obj: any): boolean; | ||
export declare function isArray(obj: any): boolean; | ||
@@ -48,0 +47,0 @@ export declare function isDate(obj: any): obj is Date; |
@@ -70,7 +70,2 @@ /** | ||
} | ||
export function isPromise(obj) { | ||
// 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); | ||
} | ||
export function isArray(obj) { | ||
@@ -77,0 +72,0 @@ return Array.isArray(obj); |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":1,"metadata":{"Math":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":4,"context":{"name":"_global"}},"Date":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":4,"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":87,"character":9},"right":"boolean"}},"isNumber":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":91,"character":9},"right":"number"}},"isString":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":95,"character":9},"right":"string"}},"isFunction":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":99,"character":9},"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":107,"character":9},"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":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{}]}}}},"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":4,"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":293,"character":20},"right":"number"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":293,"character":45},"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":311,"character":24},"right":"function"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":311,"character":51},"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":4,"context":{"name":"_global"}}},"escapeRegExp":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Expression form not supported","line":408,"character":19}}}} | ||
{"__symbolic":"module","version":1,"metadata":{"Math":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":4,"context":{"name":"_global"}},"Date":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":4,"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":87,"character":9},"right":"boolean"}},"isNumber":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":91,"character":9},"right":"number"}},"isString":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":95,"character":9},"right":"string"}},"isFunction":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":99,"character":9},"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":107,"character":9},"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":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{}]}}}},"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":4,"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":287,"character":20},"right":"number"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":287,"character":45},"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":305,"character":24},"right":"function"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":305,"character":51},"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":4,"context":{"name":"_global"}}},"escapeRegExp":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Expression form not supported","line":402,"character":19}}}} |
@@ -22,7 +22,7 @@ /** | ||
*/ | ||
export declare var ComponentFixtureAutoDetect: OpaqueToken; | ||
export declare const ComponentFixtureAutoDetect: OpaqueToken; | ||
/** | ||
* @experimental | ||
*/ | ||
export declare var ComponentFixtureNoNgZone: OpaqueToken; | ||
export declare const ComponentFixtureNoNgZone: OpaqueToken; | ||
/** | ||
@@ -38,3 +38,9 @@ * @experimental | ||
/** | ||
* @experimental | ||
* @whatItDoes Configures and initializes environment for unit testing and provides methods for | ||
* creating components and services in unit tests. | ||
* @description | ||
* | ||
* TestBed is the primary api for writing unit tests for Angular applications and libraries. | ||
* | ||
* @stable | ||
*/ | ||
@@ -41,0 +47,0 @@ export declare class TestBed implements Injector { |
@@ -11,4 +11,3 @@ /** | ||
import { ComponentFixture } from './component_fixture'; | ||
import { ListWrapper } from './facade/collection'; | ||
import { FunctionWrapper, stringify } from './facade/lang'; | ||
import { stringify } from './facade/lang'; | ||
import { TestingCompilerFactory } from './test_compiler'; | ||
@@ -37,3 +36,9 @@ var UNDEFINED = new Object(); | ||
/** | ||
* @experimental | ||
* @whatItDoes Configures and initializes environment for unit testing and provides methods for | ||
* creating components and services in unit tests. | ||
* @description | ||
* | ||
* TestBed is the primary api for writing unit tests for Angular applications and libraries. | ||
* | ||
* @stable | ||
*/ | ||
@@ -74,3 +79,3 @@ export var TestBed = (function () { | ||
var testBed = getTestBed(); | ||
getTestBed().initTestEnvironment(ngModule, platform); | ||
testBed.initTestEnvironment(ngModule, platform); | ||
return testBed; | ||
@@ -187,13 +192,14 @@ }; | ||
if (moduleDef.providers) { | ||
this._providers = ListWrapper.concat(this._providers, moduleDef.providers); | ||
(_a = this._providers).push.apply(_a, moduleDef.providers); | ||
} | ||
if (moduleDef.declarations) { | ||
this._declarations = ListWrapper.concat(this._declarations, moduleDef.declarations); | ||
(_b = this._declarations).push.apply(_b, moduleDef.declarations); | ||
} | ||
if (moduleDef.imports) { | ||
this._imports = ListWrapper.concat(this._imports, moduleDef.imports); | ||
(_c = this._imports).push.apply(_c, moduleDef.imports); | ||
} | ||
if (moduleDef.schemas) { | ||
this._schemas = ListWrapper.concat(this._schemas, moduleDef.schemas); | ||
(_d = this._schemas).push.apply(_d, moduleDef.schemas); | ||
} | ||
var _a, _b, _c, _d; | ||
}; | ||
@@ -281,3 +287,3 @@ TestBed.prototype.compileComponents = function () { | ||
var params = tokens.map(function (t) { return _this.get(t); }); | ||
return FunctionWrapper.apply(fn, params); | ||
return fn.apply(void 0, params); | ||
}; | ||
@@ -317,3 +323,3 @@ TestBed.prototype.overrideModule = function (ngModule, override) { | ||
}; | ||
var fixture = ngZone == null ? initComponent() : ngZone.run(initComponent); | ||
var fixture = !ngZone ? initComponent() : ngZone.run(initComponent); | ||
this._activeFixtures.push(fixture); | ||
@@ -329,6 +335,3 @@ return fixture; | ||
export function getTestBed() { | ||
if (_testBed == null) { | ||
_testBed = new TestBed(); | ||
} | ||
return _testBed; | ||
return _testBed = _testBed || new TestBed(); | ||
} | ||
@@ -335,0 +338,0 @@ /** |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":1,"metadata":{"ComponentFixtureAutoDetect":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"OpaqueToken"},"arguments":["ComponentFixtureAutoDetect"]},"ComponentFixtureNoNgZone":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"OpaqueToken"},"arguments":["ComponentFixtureNoNgZone"]}}} | ||
{"__symbolic":"module","version":1,"metadata":{"ComponentFixtureAutoDetect":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"OpaqueToken"},"arguments":["ComponentFixtureAutoDetect"]},"ComponentFixtureNoNgZone":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"OpaqueToken"},"arguments":["ComponentFixtureNoNgZone"]},"getTestBed":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"binop","operator":"=","left":null,"right":{"__symbolic":"binop","operator":"||","left":null,"right":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"TestBed"}}}}}}} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2192966
380
31331