javascript - Special characters in angularJs function parameter -
i'm trying call function parameter contains html tags , special characters:
$scope.translate json {"phrase": "phrase1"}
js:
$scope.t = function(phrase) { if ($scope.translate[phrase]) { return $scope.translate[phrase]; } else { return phrase; } } html:
<label class="sub-label" for="" >{{t("fields required marked <span> * </ span>")}}</label> when there special characters - function not processed, instead shows code. guess result of processing variables in angularjs. how solve problem?
if have hardcoded in html template, need put entities special characters. means using
<label class="sub-label" for="" >{{t("fields required marked <span> * </ span>")}}</label> instead.
Comments
Post a Comment