This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
ngInclude leaks if template contains comments #1620
Closed
Description
The ngInclude directive leaks if your template contains comments. For some reason Angular seems to associate random scope objects with comments. When jQuery.cleanData is eventually called it performs a getElementsByName('*'). As comment nodes and text nodes are not included in this selector the scopes associated with the comments are not cleared. Also, due to scope prototype inheritance, all parent scopes are also leaked.