This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix($parse): prevent invocation of Function's bind, call and apply
BREAKING CHANGE: You can no longer invoke .bind, .call or .apply on a function in angular expressions. This is to disallow changing the behaviour of existing functions in an unforseen fashion.
- Loading branch information
1 parent
db713a1
commit 77ada4c
Showing
3 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
@ngdoc error | ||
@name $parse:isecff | ||
@fullName Referencing 'call', 'apply' and 'bind' Disallowed | ||
@description | ||
|
||
Occurs when an expression attempts to invoke Function's 'call', 'apply' or 'bind'. | ||
|
||
Angular bans the invocation of 'call', 'apply' and 'bind' from within expressions | ||
since access is a known way to modify the behaviour of existing functions. | ||
|
||
To resolve this error, avoid using these methods in expressions. | ||
|
||
Example expression that would result in this error: | ||
|
||
``` | ||
<div>{{user.sendInfo.call({}, true)}}</div> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters