Angular ng-src not re written for revved images with Grunt / usemin

Posted by Matt Bryson on 09-Sep-2014 15:23:10

We use Yoeman to bootstrap our angular apps, but the default grunt file does not re write the revved image paths within angular ng-src directives.

Read More

Topics: Angular, Grunt

Custom Headers per request on an Angular $resource

Posted by Matt Bryson on 09-Sep-2014 14:50:14

You can set custom headers for every request, such as 'Authorization', like:

$http.defaults.headers.common.Authorization = 'Bearer 12345abcde';



And you can set them at a `Resource` level, like:

app.factory('My_Resource', ['$resource', function($resource) {
return $resource( 'http://api.domain.com/endpoint/:id', null, {
get': {headers: {'Authorization': 'Bearer 12345abcde' }},
});
}]);



But how do you set the header per request, and pass a value into the request?


Read More

Topics: Angular