mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
5b5d31fa9a
BREAKING CHANGE:
Instead of configuring pipes via a Pipes object, now you can configure them by providing the pipes property to the View decorator.
@Pipe({
name: 'double'
})
class DoublePipe {
transform(value, args) { return value * 2; }
}
@View({
template: '{{ 10 | double}}'
pipes: [DoublePipe]
})
class CustomComponent {}
Closes #3572
29 lines
727 B
TypeScript
29 lines
727 B
TypeScript
import {
|
|
ChangeDetector,
|
|
ChangeDetectorRef,
|
|
ProtoChangeDetector,
|
|
DynamicChangeDetector
|
|
} from 'angular2/src/change_detection/change_detection';
|
|
|
|
import {DependencyProvider} from 'angular2/di';
|
|
|
|
import {SpyObject, proxy} from './test_lib';
|
|
|
|
export class SpyChangeDetector extends SpyObject {
|
|
constructor() { super(DynamicChangeDetector); }
|
|
}
|
|
|
|
export class SpyProtoChangeDetector extends SpyObject {
|
|
constructor() { super(DynamicChangeDetector); }
|
|
}
|
|
|
|
export class SpyDependencyProvider extends SpyObject {}
|
|
|
|
export class SpyIterableDifferFactory extends SpyObject {}
|
|
|
|
export class SpyInjector extends SpyObject {}
|
|
|
|
export class SpyChangeDetectorRef extends SpyObject {
|
|
constructor() { super(ChangeDetectorRef); }
|
|
}
|