SIGN IN SIGN UP
angular / angular.js UNCLAIMED

AngularJS - HTML enhanced for web apps!

0 0 9 JavaScript

fix(ngMessages): create new scope for ngMessage, clean it up correctly

Previously, ngMessage elements used the same scope as ngMessages. When ngMessage
has interpolation in the textContent, then removing the message would not remove
the watcher from the scope - it would only be removed when the whole ngMessages
element was removed.

This commit changes the ngMessage transclude function to create a new child scope
instead, which can be destroyed safely when the message element is removed and
the message is detached

Fixes #14307
PR (#14308)
M
Martin Staffa committed
3360b44be6ca67ddd0a9acbe55527cf573e2ce60
Parent: e986565
Committed by GitHub <noreply@github.com> on 6/10/2016, 12:45:36 PM