Given a multi language Ionic 4 application. User can select the language.
How can I change (or more like), how can the text set to be dynamic ?
This is how far I got - but of course this isn't working:
<ion-back-button [text]="{{ app.button.back | translate }}"></ion-back-button>
UPDATE: I meant by not working, I get the following error:
Parser Error: Got interpolation ({{}}) where expression was expected at
column 0 in [{{ app.button.back | translate }}]
You are combining two features here:
[text]="{{ app.button.back | translate }}"
You just need to remove the []
so its not expecting a javascript value:
<ion-back-button text="{{ 'app.button.back' | translate }}"></ion-back-button>
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加