mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
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
36 lines
930 B
Dart
36 lines
930 B
Dart
library test_lib.spies;
|
|
|
|
import 'package:angular2/src/change_detection/change_detection.dart';
|
|
import 'package:angular2/di.dart';
|
|
import './test_lib.dart';
|
|
|
|
@proxy
|
|
class SpyChangeDetector extends SpyObject implements ChangeDetector {
|
|
noSuchMethod(m) => super.noSuchMethod(m);
|
|
}
|
|
|
|
@proxy
|
|
class SpyProtoChangeDetector extends SpyObject implements ProtoChangeDetector {
|
|
noSuchMethod(m) => super.noSuchMethod(m);
|
|
}
|
|
|
|
@proxy
|
|
class SpyDependencyProvider extends SpyObject implements DependencyProvider {
|
|
noSuchMethod(m) => super.noSuchMethod(m);
|
|
}
|
|
|
|
@proxy
|
|
class SpyChangeDetectorRef extends SpyObject implements ChangeDetectorRef {
|
|
noSuchMethod(m) => super.noSuchMethod(m);
|
|
}
|
|
|
|
@proxy
|
|
class SpyIterableDifferFactory extends SpyObject
|
|
implements IterableDifferFactory {
|
|
noSuchMethod(m) => super.noSuchMethod(m);
|
|
}
|
|
|
|
@proxy
|
|
class SpyInjector extends SpyObject implements Injector {
|
|
noSuchMethod(m) => super.noSuchMethod(m);
|
|
}
|