Use of other directives inside translation
See original GitHub issueI want to use other directives inside my translation files. So the directive should be executed after my translation placeholder was replaced.
{
"title": "Imprint",
"subtitle": "Website <a ui-sref=\"home\">example.com</a>"
}
After the translate directive replaced my palceholder “subtitle” it should execute the directive “ui-sref”, but actually thats not happening.
Is it possible to implement this?
Issue Analytics
- State:
- Created 10 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Directive inside a angular-translate translation - Stack Overflow
Try to use the translate-compile directive: ... This means any directive used in a translation value itself will now work as expected.
Read more >Create dynamic translations with HTML & Components in ...
Then we'll build our own solution to create translations with HTML and Angular Components. We'll use the translation library Transloco, but our ...
Read more >Attribute directives - Angular
To create a directive, use the CLI command ng generate directive . · Import ElementRef from @angular/core . · Add ElementRef in the...
Read more >#if, #elif, #else, and #endif directives (C/C++) | Microsoft Learn
The #if, #elif, #else, and #endif directives can nest in the text portions of other #if directives. Each nested #else, #elif, or #endif ......
Read more >How to translate your Angular app with ngx-translate
1. Add ngx-translate to your Angular application 2. Set up the TranslateService in your app.module.ts 3. Create your main language translation file (in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Okay - ngSanitize removes the
ui-sref
directive.@Phisherman thanks, I did find this same solution and it worked fine with ‘sanitizeParameters’ 😃