Created
April 23, 2016 05:40
-
-
Save sejr/e39c11ba2e395a2ec1088628fa3803f3 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
| $scope.weighItem = function() { | |
| return $http({ | |
| method: 'GET', | |
| url: 'https://jsonp.afeld.me/?url=http://smartshop-sjroot.rhcloud.com/api/readings' | |
| }); | |
| } | |
| $scope.updateReading = function() { | |
| $scope.weighItem().then(function success(res) { | |
| console.log(res); | |
| $scope.newItem.value = res.data.value; | |
| $scope.newItem.unit = res.data.unit; | |
| }, function error(res){ | |
| console.log(res); | |
| }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment