0

Here is a working example of Angular-ui-bootstrap typehead working with AngularJS 1.0.5: http://plnkr.co/edit/me20JzvukYbK0WGy6fn4

The template uses ng-bind-html-unsafe witch is deprecated in AngularJS 1.2.0-rc3.

How can I bind html unsafe in that template? I would have used ng-bind but the filter typeaheadHighlight:query adds tags in match.model.title.

Thanks!

Angelin
  • 648
  • 2
  • 7
  • 19

1 Answers1

4

AngularJS removed the ng-bind-html-unsafe tag in its 1.2RC version which breaks the default typeahead template. But you have at least 2 ways to work-around it:

  1. Move to the version 0.6.0 of the angular-ui/bootstrap library that has an equivalent tag named bind-html, here is a working plunk: http://plnkr.co/edit/D84pG1WwutE4lRU46FIs?p=preview
  2. Include the ngSanitize module and use AngularJS built-in ng-bind-html directive: http://plnkr.co/edit/9Q2Zp3BTQbstv9AjvVg4?p=preview
pkozlowski.opensource
  • 117,202
  • 60
  • 326
  • 286
  • Thanks a lot for your answer, it's flawless. I was actually using the latest version of angular-ui-bootstrap but with ng-bind-html-unsafe directive instead of bind-html-unsafe. May be useful to someone :) – Angelin Oct 25 '13 at 15:43