Simple usage of Factory in AngularJS