SIGN IN SIGN UP
angular / angular.js UNCLAIMED

AngularJS - HTML enhanced for web apps!

0 0 1 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
1c1c9b27cbb57b3219d4c9765eeea8a11553d297
Parent: c5e7a5b
Committed by Georgios Kalpakas <g.kalpakas@hotmail.com> on 4/28/2016, 5:25:13 PM