I want to let user enter special characters such as "&" and then convert those to correct html when page is submitted. ex "&" => "&" I have read the examples and found ng-bind-html and $sce.
It seems ng-bind-html is useless for my need as it will only show html text sent from controller properly converted in the view. ex: it will show "&" as "&" to the user. So what I'm doing is converting the characters using "$sce" at the controller before sending it to server. Ex:
var accountName = $sce($scope.accountName);
Is this the correct way to do this? Or is there a straight forward way to bind the view to pass sanitized text to the controller, just like ng-bind-html but in a two-way binding? I'm using Angular 1.2.4.