Updated version of code and angularjs to work with PR 2293

https://github.com/angular/angular.js/pull/2293