Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf($parse): don't bind filters to a context
This change gives us ~10% boost in Chrome, less or nothing in other browsers. BREAKING CHANGE: `this` in filters is now undefined and no longer the scope It's a bad practice for filters to have hidden dependencies, so pulling stuff from scope directly is not a good idea. Scope being the filter context was never documented as public api, so we don't expect that any significant code depends on this behavior. If an existing filter has a dependency on the scope instance, the scope reference can be passed into the filter as a filter argument (this is highly discouraged for new code): Before: `{{ user.name | customFilter }}` After: `{{ user.name | customFilter:this }}`
- Loading branch information