angular-i18n select syntax in attribute

烈酒焚心 提交于 2019-12-05 21:01:20

It seems like this an allready known issue with Angular

Allow ICU messages in attributes [blocked, requires an update of the pars

https://github.com/angular/angular/issues/16477

A workaround for this is to use a different tag to implement the translation:

<span i18n='SOME_TITLE|Description Text' #translatedPlaceholder>{VAR_SELECT, admin{you are an admin} other {you are a user}}</span>    
<input [placeholder]="translatedPlaceholder.textContent" />
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!