ng-tasty icon indicating copy to clipboard operation
ng-tasty copied to clipboard

Disable Head Title Escaping

Open radonyizsolt opened this issue 9 years ago • 1 comments

Hey there! Firstly let me congratulate! You made a very awesome thing here!

I am developing a site where i need to display html code in Head Titles. Is there any config where i can disable escaping?

Thanks again!

radonyizsolt avatar Jan 07 '16 15:01 radonyizsolt

Did you try to use https://docs.angularjs.org/api/ng/service/$sce ? I mean, something like using $sce.parseAsHtml;

$scope.resource = {
  "header": [
    { "name":  $sce.parseAsHtml("<div>Name</div>") },
    { "star": "Star" },
    { "sf-Location": "SF Location" }
  ],
  "rows": [
    { "name": "Ritual Coffee Roasters", "star": "★★★★★", "sf-location": "Hayes Valley"},
    ...
    { "name": "Flywheel Coffee Roasters", "star": "★★★★★", "sf-location": "Upper Haight" }
  ],
  "sortBy": "name",
  "sortOrder": "asc"
};

not sure will work, let me know after giving a try please.

Zizzamia avatar Jan 07 '16 22:01 Zizzamia