Open jperruchas opened 7 years ago
Hi @jperruchas
well the problem here is that the component-id
is used as standard attribute and is not parsed like some other attributes. See https://github.com/guylabs/ion-autocomplete/blob/master/src/ion-autocomplete.js#L48 how it is done currently.
You can come up with a PR to change this to a one way binded attribute like for example the placeholder
(see https://github.com/guylabs/ion-autocomplete/blob/master/src/ion-autocomplete.js#L18) Then add some tests for it, but you can copy nearly everything how it is done with the placeholder
.
Currently I do not have the time to work on the component and a PR would be really appreciated.
Thanks and regards
Guy
Hello, First, thank you for your plugin, it's very useful and easy to use. However I have an issue about the component-id. I have a javascript object which contains severals keys and values. I generate the ion-complete widgets into a ng-repeat based on this object, so I have several ion-complete widgets and I wanted to add an parameter to know which is called by the callback method. I setup the component-id like this
component-id="{{oneHosp[cle]}}"
. "cle" is the value from the ng-repeat. When I check the generated HTML template, I can seecomponent-id="1096"
. But, in the callback method, the console.log on the component-id, instead of1096
, it shows{{oneHosp[cle]}}
, why ? Thank you