How can I integrate Filestack into my AngularJS application?

The first thing you need to do is include the Filestack library:

<script type="text/javascript" src="//api.filestackapi.com/filestack.js"></script>
			

Next you should wrap a Filestack global variable into the angular service:

angular.module(‘angularFilepicker’, [])
.service(‘angularFilepicker’, function($window){
    return $window.filepicker;
});
			

Once that's done, you can do the following:

angular.module(‘angularFilepickerExample’)
    .controller(‘GalleryCtrl’, function($scope, angularFilepicker) {
        $scope.files = [];
        angularFilepicker.setKey(‘Av6PexkFtTuK4YXaE3T93z’);

        $scope.pickFile = pickFile;

        function pickFile() {
            angularFilepicker.pick({
                    mimetype: "image/*"
                },
                onSuccess
            );
        };


        function onSuccess(Blob) {
            $scope.files.push(Blob);
            $scope.$apply();
        };

    });