I want to transform keys to value(fetched from server using server call).
View
<div> {{ 'SomeText1' | performtranslation }} </div>
<div> {{ 'SomeText2' | performtranslation }} </div>
Pipe definition
transform(key: string): string {
//http server call
var updatedValue = http.get(key); //Just example
return updatedValue ;
}
Since here we have two translations, call to server is made twice. Likewise if 100 keys are there, 100 calls will be made. How can we restrict and do a single call.