I have an existing angularjs code which makes a HTTP GET. Extracted below is some relevant code inside the controller.
.controller(\'imptViewCtrl\', [\'$
Rather than using a library to encode your auth by base 64, you could just use:
window.btoa("user:pass")
it's supported by most browsers.
https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/btoa