Sample code made when learning AngularJS