angular-docs-cn/public/docs/js/latest/api/annotations/PipeAnnotation-class.jade

59 lines
870 B
Plaintext
Raw Normal View History

p.location-badge.
exported from <a href='../annotations'>angular2/annotations</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations_impl/annotations.ts#L1008-L1032">angular2/src/core/annotations_impl/annotations.ts (line 1008)</a>
:markdown
Declare reusable pipe function.
## Example
```
@Pipe({
name: 'lowercase'
})
class Lowercase {
transform(v, args) { return v.toLowerCase(); }
}
```
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation CONST
pre.prettyprint
code.
@CONST()
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor({name}: {name: string})
:markdown
.l-sub-section
h3 name
:markdown