why does this work from an init function but not on a click
var jd_phone = "63171234"
localStorage.setItem("customer_phone", jd_phone);
i'm using a button with
ng-click = save_user_settings();
why does this work from an init function but not on a click
var jd_phone = "63171234"
localStorage.setItem("customer_phone", jd_phone);
i'm using a button with
ng-click = save_user_settings();
Hello!
Could you please clarify do you have any errors when you use this code for the button click?
I don't see any errors. It works fine when i paste the above code into the init function. it doesn't appear that the function is firing
user error
i had a ";" after my function.
updated
ng-click = save_user_settings();
to
ng-click = save_user_settings()
and it worked.
didn't realize you can hit cntrl-space bar to have the ng-click automatically populated from the list.