Encapsulation of Nick Galbreath's base64.js library for AngularJS
For Base64 encoding whch supports UTF8 see angular-utf8-base64
bower install angular-base64
NB: The ngBase64
bower package is deprecated due to camel casing issues on case-sensitive file systems.
<script src="bower_components/angular-base64/angular-base64.js"></script>
angular
.module('myApp', ['base64'])
.controller('myController', [
'$base64', '$scope',
function($base64, $scope) {
$scope.encoded = $base64.encode('a string');
$scope.decoded = $base64.decode('YSBzdHJpbmc=');
}]);