I am pre-populating fields from the Facebook API:
$("#inputParentName").val(response.name);
$("#inputParentEmail").val(response.email);
$("#inputParentBirthday").val(response.birthday);
In my AngularJS service I have the following function:
vm.addParent = function () {
alert(vm.inputParentName);
alert(vm.inputParentBirthday);
alert(vm.inputParentEmail);
When this function gets called the pre-populated fields display as 'undefined' in the alert boxes. However if I type in the values I get the actual text that was typed in.
What do I need to do, to have my AngularJS code recognize the pre-populated values?
$("#some_id").val(some_val)will only set thevalueproperty of an HTML element. I don't see how you expect that to correspond with a property invm