SIGN IN SIGN UP
angular / angular.js UNCLAIMED

AngularJS - HTML enhanced for web apps!

0 0 0 JavaScript

fix(ng-bind-html): watch the unwrapped value using `$sce.valueOf()` (instead of `toString()`)

Custom `$sce` implementations might not provide a `toString()` method on the wrapped object, or it
might be compiled away in non-debug mode. Watching the unwrapped value (retrieved using
`$sce.valueOf()`) fixes the problem.

The performance of this should be equivalent - `toString()` on objects usually touches all fields,
plus we will also avoid the (potentially big) string allocation.

Fixes #14526
Closes #14527
M
Martin Probst committed
707664a3c448732443bf54027dacda39babdd0c4
Parent: 06e9640
Committed by Georgios Kalpakas <g.kalpakas@hotmail.com> on 4/28/2016, 5:18:57 PM