DefinitelyTyped/types/angular-loading-bar/angular-loading-bar-tests.ts
Tyrone Dougherty c29891901e Define the methods on the loading bar provider in angular-loading-bar (#20220)
* Allow @types/angular-loading-bar to export a string name for angular module inclusion

* Add in the methods for @types/angular-loading-bar and fix the tests
2017-10-04 22:28:31 +09:00

25 lines
573 B
TypeScript

var app = angular.module('testModule', ['angular-loading-bar']);
class TestController {
constructor($http: ng.IHttpService) {
$http.get("http://xyz.com", { ignoreLoadingBar: true })
}
}
app.controller('TestController', TestController);
var barConfig: angular.loadingBar.ILoadingBarProvider;
barConfig.includeSpinner = false;
barConfig.includeBar = false;
barConfig.spinnerTemplate = 'someOtherTemplateString';
barConfig.latencyThreshold = 70;
barConfig.startSize = 0.05;
barConfig.loadingBarTemplate = 'anotherTemplateString';
barConfig.autoIncrement = false;