Skip to content
This repository was archived by the owner on Jan 23, 2022. It is now read-only.

Commit 5dbc9e7

Browse files
author
m7r
committed
Merge pull request #3 from marcin-wosinek/master
add service example in separate file
2 parents 5c495ed + 55a85ac commit 5dbc9e7

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

Gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = function (grunt) {
1010
scripts: ['angular.js', '../src.js'],
1111
html5Mode: false
1212
},
13-
all: ['src.js']
13+
all: ['src/*.js']
1414
},
1515
connect: {
1616
options: {
File renamed without changes.

src/service.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
'use strict';
2+
3+
/**
4+
* @ngdoc service
5+
* @name rfx.rest
6+
* @description
7+
* # rest
8+
* Service to talk with backend api.
9+
*/
10+
angular.module('rfx')
11+
.service('rest', function () {
12+
13+
/**
14+
* @ngdoc
15+
* @name rfx.rest#get
16+
* @methodOf rfx.rest
17+
*
18+
* @description
19+
* Method to get data form the backend api
20+
* @example
21+
* rest.get(id);
22+
* @param {int} entity id
23+
* @returns {httpPromise} resolve with fetched data, or fails with error description.
24+
*/
25+
this.get = function () {
26+
};
27+
});

0 commit comments

Comments
 (0)