File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * User Details Service
3+ *
4+ * @factory peopleService
5+ * @namespace peopleService
6+ * @memberOf riccardo
7+ * @return {object }
8+ * @description
9+ * This service is used to get the people and the person details.
10+ */
11+
12+ ( function ( ) {
13+ 'use strict' ;
14+
15+ angular . module ( 'riccardo' ) . factory ( 'peopleService' , peopleService ) ;
16+
17+ peopleService . $inject = [ '$http' ] ;
18+
19+ function peopleService ( $http ) {
20+ var service = { } ;
21+
22+ service . getPeople = getPeople ;
23+
24+ return service ;
25+
26+ /**
27+ * @name getPeople
28+ * @function getPeople
29+ * @memberOf riccardo.peopleService
30+ * @description
31+ * Get the people.
32+ */
33+ function getPeople ( ) {
34+ // Preparing parameters object for the Http request
35+ var httpParam = {
36+ method : 'GET' ,
37+ url : 'data/people.json'
38+ } ;
39+
40+ // Http request
41+ return $http ( httpParam ) ;
42+ }
43+ }
44+ } ( ) ) ;
You can’t perform that action at this time.
0 commit comments