Behold, my code!
I'd like to increase the elapsedTime by 100 every tick, but it seems to only fire once. I can't quite figure this one out. It fires once, but won't repeat.
var gravity = angular.module('gravity', []);
function GravCtrl($interval) {
this.acceleration = 9.8;
this.elapsedTime = 0;
this.speed = 0;
this.$interval = $interval;
}
GravCtrl.prototype.start = function() {
this.counter = this.$interval(function(that) {
that.elapsedTime += 100;
that.speed = ( that.elapsedTime / 1000.0 ) * that.acceleration;
console.log('thing firing');
}(this), 100)
};
gravity.controller('GravCtrl', GravCtrl);