use flxXHR and  some one's code https://github.com/angular/angular.js/issues/934#issuecomment-18554956