CORS API supporting Symfony3 + Angular2

Is your API giving you trouble with a missing Access-Control-Allow-Origin header error? Perhaps you enjoy living on the bleeding edge, and you’ve decided to build an app with Symfony3 + Anglar2 and you’ve seen this before? XMLHttpRequest cannot load http://myapp.dev. No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://localhost:4000’ Read more…

Symfony + GulpJS

I recently endeavored to update CamelotHub to Symfony3 and in doing so I abandoned Assetic in place of a more modern gulp approach. All things considered it was actually quite straight forward and certainly less overhead than Assetic. var gulp = require(‘gulp’); var sass = require(‘gulp-sass’); var concat = require(‘gulp-concat’); Read more…

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…