Call
The call pipe will call your component methods are pure pipe.
Example component
An example in COMPONENT.component.ts.
@Component({ ... })
class ExampleComponent {
method(value: string): string {
return value && value.toUpperCase();
}
}Call method via function
An example in COMPONENT.template.html.
{{ text | call: method }}Call method via string
An example in COMPONENT.template.html.
{{ text | call: 'method' }}Call method with additional arguments
An example in COMPONENT.template.html.
{{ text | call: method: 'additional': 'arguments' }}Last updated