You need to sign in to do that
Don't have an account?
d.tejdeep@nicomatic.in
I want to pass HTML input data to the lighting controller
pass html input data to lightning js controller
<input type="text" id="getet"/>
var nameField =component.find("getet"); var itemname = nameField.get("v.value"); alert(itemname);
I want to pass HTML input data to the lighting controller
Kindly use JQuery
var nameField =$("#getet").val();
Thanks
In-case your requirement is not fulfilled by the lightning input tags (which is unlikely), I would recommend using the 'aura:id' rather than the native 'id' attribute.
If using JQuery you may need to upload the script as static resource and use it in your component.
Another method is to use simple javascript to acces the input data.
Or you may use lightning input tags as Sagar mentioned.
Thanks