axel-zarate / js-custom-select

Custom auto-complete select box for AngularJS and Bootstrap
MIT License
68 stars 59 forks source link

NgOptions Error and custom-select error #28

Open pravin-d opened 8 years ago

pravin-d commented 8 years ago

I'm following the sample from https://axelzarate.wordpress.com/2014/07/31/custom-dropdown-autocomplete-with-angularjs/

However in angular >=1.4 ng-options is not allowed without a select element. Also in your code you seem to be expecting custom-select="s.id as s.name for s in states" and also custom-select-options="s.id as s.name for s in states" is giving an error [$parse:syntax] Syntax Error: Token 'as' is an unexpected token at column 9 of the expression [s.id as s.name for s in states] starting at [as s.name for s in states].

axel-zarate commented 8 years ago

Hello, That post was for the initial version of the control. Version 2 has breaking changes so I made a new post https://axelzarate.wordpress.com/2015/09/17/custom-dropdown-auto-complete-with-angularjs-version-2/. Also, the readme file here on Github has documentation and examples.