Angular + Symfony file upload with AWS S3

First, using the fantastic work of Jenny Louthan of Uncorked Studios, implement this directive: Directives.directive(‘fileModel’, [‘$parse’, function ($parse) { return { restrict: ‘A’, link: function(scope, element, attrs) { var model = $parse(attrs.fileModel); var modelSetter = model.assign; element.bind(‘change’, function(){ scope.$apply(function(){ modelSetter(scope, element[0].files[0]); }); }); } }; }]); Secondly, write the Angular function to handle Read more…

Custom angular smart-table pagination template

Short and sweet. Implemented smart-table on a new project, and needed to customize the pagination template. This is simply an override of the default found in smart-table.js ng.module(‘smart-table’, []).run([‘$templateCache’, function ($templateCache) { $templateCache.put(‘template/smart-table/pagination.html’, ‘<nav ng-if=”numPages && pages.length >= 2″><ul class=”pagination”>’ + ‘<li ng-class=””><a ng-click=”selectPage(1)”>First</a></li>’ + ‘<li ng-class=””><a ng-click=”selectPage(currentPage-1)”><i class=”fa fa-fw Read more…