80 lines
1.1 KiB
Plaintext
80 lines
1.1 KiB
Plaintext
|
|
||
|
p.location-badge.
|
||
|
exported from <a href='../change_detection'>angular2/change_detection</a>
|
||
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.32/modules/angular2/src/change_detection/pipes/pipe.ts#L28-L55">angular2/src/change_detection/pipes/pipe.ts (line 28)</a>
|
||
|
|
||
|
:markdown
|
||
|
An interface for extending the list of pipes known to Angular.
|
||
|
|
||
|
If you are writing a custom <a href='Pipe-interface.html'><code>Pipe</code></a>, you must extend this interface.
|
||
|
|
||
|
#Example
|
||
|
|
||
|
```
|
||
|
class DoublePipe implements Pipe {
|
||
|
supports(obj) {
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
onDestroy() {}
|
||
|
|
||
|
transform(value, args = []) {
|
||
|
return `${value}${value}`;
|
||
|
}
|
||
|
}
|
||
|
```
|
||
|
|
||
|
|
||
|
.l-main-section
|
||
|
h2 Members
|
||
|
.l-sub-section
|
||
|
h3 supports
|
||
|
|
||
|
|
||
|
pre.prettyprint
|
||
|
code.
|
||
|
supports(obj: any)
|
||
|
|
||
|
:markdown
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
.l-sub-section
|
||
|
h3 onDestroy
|
||
|
|
||
|
|
||
|
pre.prettyprint
|
||
|
code.
|
||
|
onDestroy()
|
||
|
|
||
|
:markdown
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
.l-sub-section
|
||
|
h3 transform
|
||
|
|
||
|
|
||
|
pre.prettyprint
|
||
|
code.
|
||
|
transform(value: any, args: List<any>)
|
||
|
|
||
|
:markdown
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|