AngularJS directive with DOM manipulation

I recently wanted to create a spoiler box with AngularJS but I didn’t want to have to inject anything other than the CSS3 classes and the directive name to make it work. After a little bit of research I learned…

 Dave

About David Parlevliet

Dave is long time developer with a passion toward teaching. He divides his time between his wife, her cat and his projects. He recently started using twitter so make sure to follow him!

Gulp pipe callback

Gulp pipe callback

I’ve spent the better part of the afternoon wrestling asynchronous issues in Gulp. I needed to concat a shitload of scripts and then after concat I needed to rename them to a certain name that couldn’t be done by simply…

 Dave

About David Parlevliet

Dave is long time developer with a passion toward teaching. He divides his time between his wife, her cat and his projects. He recently started using twitter so make sure to follow him!

Phonegap Android HTML5 Video issue (error 2147483648)

Phonegap Android HTML5 Video issue (error 2147483648)

I’m writing this to hopefully help some of the thousands of people out there having an issue getting videos to play using Phonegap and Android. I don’t exactly know what the problem is, my best guess is that for some…

 Dave

About David Parlevliet

Dave is long time developer with a passion toward teaching. He divides his time between his wife, her cat and his projects. He recently started using twitter so make sure to follow him!

Backbone JS save collections

Backbone JS save collections

I see a lot of confusion on the interweb about this process, and a lot of outdated answers on sites like stack overflow (though, the process is still 99% accurate). So, I thought I would put out some good karma…

 Dave

About David Parlevliet

Dave is long time developer with a passion toward teaching. He divides his time between his wife, her cat and his projects. He recently started using twitter so make sure to follow him!

Backbone Router: Nagivate to the previous route using Backbone.simplerouter

Backbone Router: Nagivate to the previous route using Backbone.simplerouter

There will come a time when you will need to send the user back one page in their history for whatever reason. I will show you how to do this using Backbone.simplerouter. The source Your project will need to be…

 Dave

About David Parlevliet

Dave is long time developer with a passion toward teaching. He divides his time between his wife, her cat and his projects. He recently started using twitter so make sure to follow him!

How to properly use Backbone.cachingSync on models

How to properly use Backbone.cachingSync on models

Backbone.cachingSync has support to be used with models directly, but that seemed to confuse me because your model would always be wrong if you do that, because when you define your model you’re meant to define the namespace for storage….

 Dave

About David Parlevliet

Dave is long time developer with a passion toward teaching. He divides his time between his wife, her cat and his projects. He recently started using twitter so make sure to follow him!

A Backbone preloader for those important Models/Collections

A Backbone preloader for those important Models/Collections

I needed to make sure some specific collections were available before anything Backbone related could begin. This isn’t an ideal situation, but I have taken steps to correctly cache those collections/models so after the first preload Backbone should load as…

 Dave

About David Parlevliet

Dave is long time developer with a passion toward teaching. He divides his time between his wife, her cat and his projects. He recently started using twitter so make sure to follow him!

An unobtrusive Backbone cache

An unobtrusive Backbone cache

I did some research last night to save myself the trouble of having to implement my own Backbone caching system. I found Backbone.localStorage and Backbone.offline. Backbone.localStorage wouldn’t work for me properly. It wouldn’t do the initial fetch to retrieve and…

 Dave

About David Parlevliet

Dave is long time developer with a passion toward teaching. He divides his time between his wife, her cat and his projects. He recently started using twitter so make sure to follow him!

Making your Backbone.Router neat and tidy with Backbone.simplerouter

Making your Backbone.Router neat and tidy with Backbone.simplerouter

One thing that’s consistently bothered me about Backbone is the way that Backbone.Router works. I standardise all my page Backbone.View so that each instance loads and unloads exactly the same way, and I’m sure you and everyone else does too….

 Dave

About David Parlevliet

Dave is long time developer with a passion toward teaching. He divides his time between his wife, her cat and his projects. He recently started using twitter so make sure to follow him!

HTML5 localStorage toolkit

HTML5 localStorage toolkit

HTML5 has brought with it 5mb of local storage for to make use of. What does this mean? It’s basically a key/value table where you can store persistent data. So you don’t have to keep loading it every browser request,…

 Dave

About David Parlevliet

Dave is long time developer with a passion toward teaching. He divides his time between his wife, her cat and his projects. He recently started using twitter so make sure to follow him!