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 &lt;span&gt; * &lt;/ span&gt;")}}</label> 

instead.


Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Magento/PHP - Get phones on all members in a customer group -

session - Logging Out Using PHP -