Created
December 13, 2018 05:54
-
-
Save chanakaDe/082fb1ba34eb2d8b26895f3e6f1b1cdd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this is how i call service from controller | |
sessionService.getAllSessions(100, 0).then(function (data) { | |
console.log(data); | |
$scope.allSessions = data.data; | |
}); | |
// This is the service layer | |
getAllSessions: function (limit, offset) { | |
return $http({ | |
method: "GET", | |
url: host.session_manage + '/session/' + limit + '/' + offset | |
}).then(function (response) { | |
return response.data; | |
}); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment