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
8 lines
256 B
TypeScript
8 lines
256 B
TypeScript
import {ABSTRACT, BaseException, CONST, Type} from 'angular2/src/facade/lang';
|
|
|
|
export class InvalidPipeArgumentException extends BaseException {
|
|
constructor(type: Type, value: Object) {
|
|
super(`Invalid argument '${value}' for pipe '${type}'`);
|
|
}
|
|
}
|