angular
angular copied to clipboard
refactor(compiler): save/restore view when listeners read references
Port of @alxhub's fix that only was pushed to the signals branch.
Previously, the template pipeline save/restore view logic only added the save/restore operation in listeners inside embedded views. However, this operation is also needed if local refs are accessed within a listener body.
This commit updates the logic to detect more accurately whether save/restore is needed.