I am building an AngularJS App, with a PHP RESTful API for the Backend. I am wondering what is the best way to take advantage of the 2-Way Data Binding of AngularJS with my example.
For example, I have a checkbox called: "Activate Newsletter", which is linked to a column in my MySQL database: Here is my HTML Code:
<input type="checkbox" ng-model="newsletter"> Activate NewsLetter
(newsletter is a variable from the scope of my Controller)
What is the best way to send a request to my PHP Server, using 2 Way Data Binding, to make it change instantly when the user checks/unchecks this box.
Thank you!