Last active
December 18, 2015 22:20
-
-
Save ocReaper/5bc68467fc874a179c2d to your computer and use it in GitHub Desktop.
Blob file download in Angular.js using $resource Part 1
This file contains 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
(function () { | |
'use strict'; | |
angular | |
.module('app') | |
.factory('Email', Email); | |
function Email($resource) { | |
var url = 'emails/' | |
, EmailBase; | |
EmailBase = $resource(url + ':emailId', {emailId: '@id'}, { | |
getFile: { | |
method: 'GET', | |
url: url + ':emailId/files/:fileName', | |
params: { | |
emailId: '@id', | |
fileName: '@fileName' | |
}, | |
cache: false | |
} | |
}); | |
return EmailBase; | |
} | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment