Changed AngularJS sample. Simplified it