refactor(core): separate reflective injector from Injector interface

BREAKING CHANGE:
- Injector was renamed into `ReflectiveInjector`,
  as `Injector` is only an abstract class with one method on it
- `Injector.getOptional()` was changed into `Injector.get(token, notFoundValue)`
  to make implementing injectors simpler
- `ViewContainerRef.createComponent` now takes an `Injector`
  instead of `ResolvedProviders`. If a reflective injector
  should be used, create one before calling this method.
  (e.g. via `ReflectiveInjector.resolveAndCreate(…)`.
This commit is contained in:
Tobias Bosch
2016-04-14 12:35:24 -07:00
parent efbd446d18
commit 0a7d10ba55
46 changed files with 1790 additions and 1719 deletions

View File

@ -169,7 +169,7 @@ var NG_CORE = [
'PLATFORM_PIPES',
'DebugNode',
'DebugElement',
'Dependency',
'ReflectiveDependency',
'DependencyMetadata',
'Directive',
'DirectiveMetadata',
@ -194,10 +194,11 @@ var NG_CORE = [
'Injectable',
'InjectableMetadata',
'Injector',
'ReflectiveInjector',
'InstantiationError',
'InvalidProviderError',
'IterableDiffers',
'Key',
'ReflectiveKey',
'KeyValueChangeRecord',
'KeyValueDiffers',
'NgZone',
@ -219,9 +220,9 @@ var NG_CORE = [
'Renderer',
'RootRenderer',
'RenderComponentType',
'ResolvedBinding:dart',
'ResolvedProvider:dart',
'ResolvedFactory',
'ResolvedReflectiveBinding:dart',
'ResolvedReflectiveProvider:dart',
'ResolvedReflectiveFactory',
'Self',
'SelfMetadata',
'SkipSelf',