Files
angular.js/docs/content/error/$parse/isecfld.ngdoc
2014-07-21 14:52:41 -07:00

28 lines
736 B
Plaintext

@ngdoc error
@name $parse:isecfld
@fullName Referencing Disallowed Field in Expression
@description
Occurs when an expression attempts to access one of the following fields:
* __proto__
* __defineGetter__
* __defineSetter__
* __lookupGetter__
* __lookupSetter__
AngularJS bans access to these fields from within expressions since
access is a known way to mess with native objects or
to execute arbitrary Javascript code.
To resolve this error, avoid using these fields in expressions. As a last resort,
alias their value and access them through the alias instead.
Example expressions that would result in this error:
```
<div>{{user.__proto__.hasOwnProperty = $emit}}</div>
<div>{{user.__defineGetter__('name', noop)}}</div>
```