Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue with the "component-id" #227

Open
jperruchas opened this issue Mar 29, 2017 · 1 comment
Open

issue with the "component-id" #227

jperruchas opened this issue Mar 29, 2017 · 1 comment
Assignees
Milestone

Comments

@jperruchas
Copy link

jperruchas commented Mar 29, 2017

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 see component-id="1096". But, in the callback method, the console.log on the component-id, instead of 1096, it shows {{oneHosp[cle]}}, why ?
Thank you

@guylabs guylabs added this to the Backlog milestone May 4, 2017
@guylabs
Copy link
Owner

guylabs commented May 4, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants