AngularJS console errors are links to further details (?!)

I don’t know why I didn’t notice or try this before, but I noticed in the Udemy ‘AngularJS Zero to Hero’ course that the instructor was clicking the links in the console errors. Previously I thought those rather oddly looking random character messages in the console were just not particularly friendly, but now they make more sense.

Maybe this is completely obvious to others, but this is a very neat feature that I had completely not picked up on.  The links are parameterized with details of your specific error, and the error message page in the AngularJS docs gives you more specifics about the error.

For example, if I have a typo in my ng-app:

Clicking on the link in the error message takes you to a detailed page with further details:

Managing web dependencies with bower

Some rough notes on Bower to remember for future usage:

  • bower install name : install dependency ‘name’
  • bower list : list current project dependencies
  • bower search name : search for a module in the repo
  • bower update name : update name to latest
  • bower update name#1.1 : update name to 1.1

Getting started ref here.

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.

Raspbian fsck fails on boot

I used

sudo touch /forcefsck

to set my Pi to run a fsck at boot, but it failed with this message:

"An automatic check (fsck) of the root filesystem failed. A manual fsck must 
be performed, then the system restarted. The fsck should be performed in 
maintenance mode with the root filesystem mounted in read-only mode"

I ran  sudo fsck /dev/mmcblk0p2 – there was a couple of errors that required a ‘y’ to fix, and then it completed. Rebooted, and back to normal. Similar discussion on this message here.