Last but not least, I found the book " Mastering Web Application Development with AngularJS " by Peter Bacon Darwin and Pawel Kozlowski, to be the most useful resource when starting with AngularJS. The book presents all the concepts of AngularJS from a very pragmatic approach and illustrated with real life examples.

With all these resources read, I felt ready and very excited to start implementing my first AngularJS application, leveraging Bonita BPM 6 REST APIs!

The main.js script declares the AngularJS module, in which all the sub modules will be included.
A global variable loggedUser is declared to host the information of the user currently logged in (if any).
The controller 'MainCtrl',checks whether the user is already logged in and updates the scope accordingly.

The login.js script exposes a login (username and password) function to the scope. This method makes a server call to post credentials information and authenticates the user. If successful, the 'loggedUser' global variable is updated to store the identity of the user. Otherwise the visitor remains un-authenticated.

The HTML fragment (partial) in 'login-tpl.html' describes a login box form. This is what our visitor will see if they are not authenticated. The form asks for a username and password. When the visitor hits the 'sign in' button, the login (username and password) method is called on the visible scope.