Fixed to use with AngularJS v1.0.8