Zizzamia / ng-tasty

A tasty collection of reusable UI components for Angular, like grandma used to make. Like Table directive, WebSocket / Debounce / Throttle service, Range / Camelize / Slugify filters
MIT License
434 stars 64 forks source link

Disable Head Title Escaping #203

Open radonyizsolt opened 8 years ago

radonyizsolt commented 8 years ago

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!

Zizzamia commented 8 years ago

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.