I am creating my custom pipe, culture
which performs some async localdb/http request to return data from the server. Let's look at the following:
{{ 'hello' | culture:'es-mx' }}
I need this to be Hola
, but I want this to be rendered async
. The PipeTransform
interface provides me with transform(value: any, ...args: any[]): any
interface. How can I implement it async
? Is this something doable?
The answers in this question, for example suggest the async
pipe, followed by a filter/sort
to achieve this to be actively listening to an array changes and filter, but that seems performance heavy because there are many pipes in my application.
I would like to implement something like this:
transform(value: any, ...args: any[]): any {
operation.subscribe(result => {
// set the pipe value from here...
})
}