angular/angular.js — pull request #4045 by rodyhaddad (2013-09-18 16:59:15+00:00)
Title: fix($sce): make trustAs watchable

068d8615d245a70bfde9007606b08a54c6e1cfec made changes to ngBindHtml, making it watch `attr.ngBindHtml` instead of `$sce.parseAsHtml(attr.ngBindHtml)`. (landed in 1.2.0rc2)

Since the `attr.ngBindHtml` expressions returned the result of calling `$sce.trustAs`, we would get a `[$rootScope:infdig]` error (#3932, #3980), because `.trustAs` always returns a new object.

This PR solves the problem by caching the trustedValues returned by `$sce.trustAs`