mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-02 22:37:07 +08:00
The leak can occur when ngSwich is used inside ngRepeat or any other directive which is destroyed while its transcluded content (which includes ngSwitch) is not attached to the DOM. Refactor ngSwitch to use controller instead of storing data on compile node. This means that we don't need to clean up the jq data cache. Controller reference is released when the linking fn is released. Closes #1621