Code for AngularJS training course