I'm submitting a ... (check one with "x")
[x] feature request
Current behavior
I'm migrating an application from AngularJS and angular-translate and I was able to use pipes inside translation strings, like:
{
"TEST_1": "Viewing {{ num | number:2 }} items",
"TEST_2": "hide {{ type | translate }}",
}
Expected/desired behavior
Be able to use pipes inside translation strings.
Reproduction of the problem
Currently you get the same translation text without parameters interpretation:
it('should be able to get translations with nested params with pipes', () => {
translations = {"TEST": "This is a test {{value | number}}"};
translate.use('en');
translate.get('TEST', {value: 12}).subscribe((res: string) => {
expect(res).toEqual('This is a test 12');
});
});
Karma shows: Expected 'This is a test {{value | number}}' to equal 'This is a test 12'.
I'm sorry but this is not possible in Angular because we don't have access to the compiler like we did in AngularJS...
So? what can we do?