AngularJS - Hold To Activate Button Directive

I needed a hold button that gave visual feedback. This fills with a color and duration you define then calls whatever method you give it. Arguments are allowed as part of the success callback. I'll continue to tweak on it as I use it more.


Writing CSV Files Using Drupal

I'm leaving this one here, mostly as a note for myself. I've found too often that samples on the web, and indeed in existing code I inherit are chalked full of 'doing it the hard way' and memory leaks. This is the simplest and cleanest method for handling streaming large amounts of data out to a csv.


Lazy Loading Angular (<= 1.3) Controllers

As your angular application grows, you'll quickly look for ways to distribute logic into manageable portions. You could (and should) simply produce js files dedicated to directives, controllers, and app separately, then use grunt to create your production file. But, you can do one better than that. You can simply not load entire sections of the site the user never visits. Through the use of require.js and angular's ui-router you can lazy load page controllers on demand, just like the template files.

File Breakdown

To make this work you'll need the following setup:


Drupal 7 Services List and Entity Reference Field Issues

I've been working on an angularjs project that features a Drupal services backend. As I'm new to angular (or was), I thought I had to have been doing something wrong posting data back to Drupal to save my user accounts. The response from the services backend would be a 406, with the messages:

406 (Not Acceptable : An illegal choice has been detected. Please contact the site administrator.)



Subscribe to Fragmented Thought RSS