Getting Started with AngularJS (pt 4): Form submits and two-way data binding

The trouble with learning something new and then not using it for a while is you tend to forget everything you learned a few weeks back.

So picking up again on learning AngularJS (see my previous posts here), I had completely forgot how to handle form submits using AngularJS.

The key is to use the directive ng-submit=”functionname()” on your form, where functionname() is some function defined in $scope in your controller for this form.

The values in your form are automagically bound to your model in your controller, and you can handle the user action of pressing a submit button to do whatever processing you need.

There’s a great explanation in this article here.

Raspberry Pi /boot/config.txt for LG E2341 monitor

Each time I setup a new Pi or SD Card, I have to go back and find what /boot/config.txt settings I used last time to get HDMI working with my LG 2341 monitor, so for reference (ymmv), here’s the settings I uncommented or added:

hdmi_force_hotplug=1

hdmi_group=1
hdmi_mode=16

hdmi_drive=2