Last active
August 29, 2015 14:24
-
-
Save samirbr/a98ca62a2efca1fe97d5 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
angular.module('myApp') | |
.factory('Harvest', [ | |
'$resource', | |
function ($resource) { | |
return $resource('/viewver/api/harvest_viewver/?id', {'id': '@id'}, { | |
create: { method: 'POST' } | |
update: { method: 'PUT' } | |
}); | |
} | |
]); |
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
harvests = {{ harvest_json|safe }}.map(function (harvest) { | |
var h new Harvest(harvest); | |
h.value = new Value(h.value); | |
return h; | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment