Reputation: 135
following the angular documentation
I write that part of code:
<select ng-model="model" ng-options="item.CODE as item.NAME disable when item.DISABLE for item in list" id="foo" name="foo" ng-change="change()">
but return me back this error:
Syntax Error: Token 'disable' is an unexpected token at column 11 of the expression [{3}] starting at [{4}].
What I'm doing wrong?
Upvotes: 1
Views: 2139
Reputation: 932
Try updating the angular.js version. This functionality was added in version 1.4.X and above.
Upvotes: 1
Reputation: 6766
You are referring to wrong syntax. For disable with array there is only two syntax available.
Try out following:
<select ng-model="model" ng-options="item.CODE disable when item.DISABLE for item in list" id="foo" name="foo" ng-change="change()">
Upvotes: 2