Background: I'm having some interop issues with angular-material, e.g. #214 or angular/material#1742. In both cases the initial render is ok, but subsequent changes of the language via setCurrentLanguage(...) don't produce the desired effect.
My current workaround is to just flip the language variable and reload the current state:
gettextCatalog.currentLanguage = ...
$state.reload()
I realize that this uses ui-router and loses content of <input> fields, on the other hand it is more robust since you only have to be able to render once. Another advantage is that you can use one-time bindings {{::"Text"|translate}}. Is there any other issue that I haven't thought about? Would there be interest to "bless" this workaround by adding a special setter setCurrentLanguageAndReload, say?
Background: I'm having some interop issues with angular-material, e.g. #214 or angular/material#1742. In both cases the initial render is ok, but subsequent changes of the language via
setCurrentLanguage(...)don't produce the desired effect.My current workaround is to just flip the language variable and reload the current state:
I realize that this uses ui-router and loses content of
<input>fields, on the other hand it is more robust since you only have to be able to render once. Another advantage is that you can use one-time bindings{{::"Text"|translate}}. Is there any other issue that I haven't thought about? Would there be interest to "bless" this workaround by adding a special settersetCurrentLanguageAndReload, say?