I am trying to implement one standard where all string files are from separate constant files. Everything works great, but facing difficult when dynamic values in string occurs. Kindly help me how to use the constants.
constant.ts
export enum testPageConstants {
SuccessMessage = 'You have created {{count}} users'
}
userPage.ts
export class UserPage {
import {testPageConstants} from '...';
constantUIBind: typeof testPageConstants;
count = 10;
constructor() {
this.constantUIBind = testPageConstants;
}
}
userPage.html
<p> {{constantUIBind.SuccessMessage}}</p>
Output: In HTML am receiving like 'You have created {{count}} users' but I want like 'You have created 10 users