Skip to content

Instantly share code, notes, and snippets.

@Sampath-Lokuge
Created June 7, 2020 17:44
Show Gist options
  • Save Sampath-Lokuge/a1d978e3cb8f9f04c53b17facf9ec2cb to your computer and use it in GitHub Desktop.
Save Sampath-Lokuge/a1d978e3cb8f9f04c53b17facf9ec2cb to your computer and use it in GitHub Desktop.
Apply param with the translate service and array of strings
setPayPal(): void {
forkJoin([this.translateService.get(['Client.Pay-With-PayPal', 'Client.Pay-Now']),
this.translateService.get('Client.Please-Click-And-Make-The-Payment', { value: environment.parcelDeliveryCost })])
.subscribe(([res1, res2]) => {
this.payPal = {
title: res1['Client.Pay-With-PayPal'],
payPalUrl: environment.payPalUrl,
description: res2,
parentButtonText: res1['Client.Pay-With-PayPal'],
childButtonText: res1['Client.Pay-Now'],
};
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment