SIGN IN SIGN UP
angular / angular.js UNCLAIMED

AngularJS - HTML enhanced for web apps!

0 0 188 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
f31586db4115baabaa854c095278f367850a11c5
Parent: 8337b9b
Committed by Georgios Kalpakas <g.kalpakas@hotmail.com> on 4/28/2016, 5:26:03 PM