AngularJS - set common Basic Auth header that is applied to all http requests

I am using AngularJS with Play REST services on the back end and I'm fairly new to both concepts.
I want to know if there is a way in which I can write the Basic Auth header at just one place so that is is added by default to every http request that is being made by Angular.