how to set a display name in menu using a variable....
tejas008 opened this issue · comments
Thanks for your support all the way..I am trying to set a display name to menu using a variable...I am using ng2-translate ...as per selected language i want to set a display name.I am quiet confused or if i may using it in wrong way..but when i set the variable to display name it show nothing in side menu..please correct me ...its urgent.....thanks in advance
This is my code
What is the output of console.log(res)
?
Anyway, I think that instead of doing things in that way, you can send the translation key as the displayName
(would be "Dashboard" in your end, right?) and then add the translate
pipe in the html code:
Let me know if that works or we should handle it in a different way.
Btw, I'll add support for ng2-translate soon :)
I am also waiting for the ng2-translate support!
I'll close this issue since using the translate
pipe in the view should fix it for now until we add support for ngx-translate
. Feel free to re-open it if you need any help.
Thanks :)