21 lines
499 B
TypeScript
21 lines
499 B
TypeScript
/**
|
|
* @license
|
|
* Copyright Google Inc. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
* found in the LICENSE file at https://angular.io/license
|
|
*/
|
|
|
|
import {Injectable} from '@angular/core';
|
|
|
|
/**
|
|
* A backend for http that uses the `XMLHttpRequest` browser API.
|
|
*
|
|
* Take care not to evaluate this in non-browser contexts.
|
|
*/
|
|
@Injectable()
|
|
export class BrowserXhr {
|
|
constructor() {}
|
|
build(): any { return <any>(new XMLHttpRequest()); }
|
|
}
|