vitalets / angular-xeditable

Edit in place for AngularJS
http://vitalets.github.io/angular-xeditable
MIT License
1.91k stars 403 forks source link

How to bind two editable-select , e-ng-options together? #521

Closed JaosnHsieh closed 8 years ago

JaosnHsieh commented 8 years ago

Hi , I'm trying to make a car Brands -> Models input options but I can't change the 2nd input options after I selected the 1st input.

Like when I select "Ford" then I can only select 'Focus' or 'Fiesta' at the next input. And when I select 'Toyota' then I can only select 'Camry' at the next input.

below is the link I didn't finish.

http://jsfiddle.net/NfPcH/16483/


I found an possible way to make it , put ng-change directive on the first option then I can change the second options , but I tried to put "ng-change" on the editable tag , it shows an error " ReferenceError: models is not defined " , Where can I put ng-change will bind the select input element? Thanks.

http://jsfiddle.net/NfPcH/16490/

Thanks


Update :

I found a "e-ng-change" and then put $data as parameter , it works. Thanks. http://jsfiddle.net/NfPcH/16491/

ckosloski commented 8 years ago

Thanks for posting your results!! Can this issue be closed now?