I have a string used with ember-i18n
which should contain 2 actions. The text in english is By clicking Signup you agree to our Terms and Privacy Policy
and I need to add two links, one on Terms
and the other on Privacy Policy
. That text is also translated in other 9 languages and obviously the linkable part can be in different places of the string.
The link should be handled by an action in my controller that show a liquid-fire modal.
// controller/signup.js
export default Ember.Controller.extend({
actions: {
viewTerms() {
this.set("showTermsPopup", true);
}
}
})
// router.js
...
this.modal("terms-modal", {
withParams: ["showTermsPopup"],
controller: "signup",
otherParams: ["termsStmt"]
});
...
// templates/signup.hbs
...
//translated text with actions
...
The result I'd like to have is as I write in the template
By clicking Signup you agree to our <a >Terms</a> and <a >Privacy Policy</a>
Any suggestion on how to implement that is welcome.
Versions: ember-cli: 2.5.1 ember.js: ~2.5.0 ember-i18n: 4.2.1
Aucun commentaire:
Enregistrer un commentaire