feat(pipes): replaces iterable and key value diffing pipes with services

BREAKING CHANGE:
    Directives that previously injected Pipes to get iterableDiff or keyvalueDiff, now should inject IterableDiffers and KeyValueDiffers.
This commit is contained in:
vsavkin
2015-07-31 12:23:50 -07:00
parent c20a5d65d8
commit 392de4af67
20 changed files with 595 additions and 260 deletions

View File

@ -33,3 +33,8 @@ class SpyDependencyProvider extends SpyObject implements DependencyProvider {
class SpyChangeDetectorRef extends SpyObject implements ChangeDetectorRef {
noSuchMethod(m) => super.noSuchMethod(m);
}
@proxy
class SpyIterableDifferFactory extends SpyObject implements IterableDifferFactory {
noSuchMethod(m) => super.noSuchMethod(m);
}

View File

@ -24,3 +24,5 @@ export class SpyPipe extends SpyObject {
export class SpyPipeFactory extends SpyObject {}
export class SpyDependencyProvider extends SpyObject {}
export class SpyIterableDifferFactory extends SpyObject {}

View File

@ -8,7 +8,11 @@ import {
ChangeDetection,
DynamicChangeDetection,
Pipes,
defaultPipes
defaultPipes,
IterableDiffers,
defaultIterableDiffers,
KeyValueDiffers,
defaultKeyValueDiffers
} from 'angular2/src/change_detection/change_detection';
import {ExceptionHandler} from 'angular2/src/core/exception_handler';
import {ViewLoader} from 'angular2/src/render/dom/compiler/view_loader';
@ -119,8 +123,10 @@ function _getAppBindings() {
CompilerCache,
bind(ViewResolver).toClass(MockViewResolver),
bind(Pipes).toValue(defaultPipes),
Log,
bind(IterableDiffers).toValue(defaultIterableDiffers),
bind(KeyValueDiffers).toValue(defaultKeyValueDiffers),
bind(ChangeDetection).toClass(DynamicChangeDetection),
Log,
ViewLoader,
DynamicComponentLoader,
DirectiveResolver,