I'm working on localization with Angular and I'm stuck with one last thing here.
I have this json blob
{ "key": "_need_to_login_", "value": "You need to <a ng-click=\"login()\">log in</a> to add an event.", "description": "Banner alert info tell user to login before they can add an event" } So with this Angular i18n module I will be able to do this
{{ "_need_to_login_" | i18n }} The problem is that it contains some markup in there and it will simple escape it and will display this on the page
You need to <a ng-click="login()">log in</a> to add an event. But with ngSanitize I'm able to unescape that markup and display it correctly as:
You need to log in to add an event.
But I don't have that ng-click inserted as well.
Try copy that and test it here : http://docs.angularjs.org/api/ngSanitize/service/$sanitize
My question is that how can I insert ng-click from the injected code as well as unescape the string?