We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
I am using .net core and Angular in a multi tenant application. In my localization text I have this:
Text {0} plus text {1}
In my code in Angular I am putting this:
{{ "question_login_to_ask_questions" | localize:'/account/login':'/account/register' }}
However, both parameters are shown in the position {0}. Does someone know how I can show the values correctly?
Thanks so much for your time.
Regards, Arturo
The text was updated successfully, but these errors were encountered:
After investigate more and debug, I found the follow code can be improved to handle more than one parameter:
import { Injector, Pipe, PipeTransform } from '@angular/core'; import { AppComponentBase } from '@shared/app-component-base'; @Pipe({ name: 'localize' }) export class LocalizePipe extends AppComponentBase implements PipeTransform { constructor(injector: Injector) { super(injector); } transform(key: string, ...args: any[]): string { return this.l(key, args); } }
We need to change this line: return this.l(key, args);
return this.l(key, args);
By
return this.l(key, ...args);
This will solve my problem sending more than 1 parameter to the pipe.
Sorry, something went wrong.
We will check this. Thanks, @amendez1000
aspnetboilerplate/module-zero-core-template@9dff089
Allows 'localize' pipe to work with multiple parameters
d39a63b
close aspnetboilerplate/aspnetboilerplate#5795
demirmusa
No branches or pull requests
Hello,
I am using .net core and Angular in a multi tenant application. In my localization text I have this:
Text {0} plus text {1}
In my code in Angular I am putting this:
{{ "question_login_to_ask_questions" | localize:'/account/login':'/account/register' }}
However, both parameters are shown in the position {0}. Does someone know how I can show the values correctly?
Thanks so much for your time.
Regards,
Arturo
The text was updated successfully, but these errors were encountered: