diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 5d99d1044..fda65cb32 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -13,6 +13,7 @@ All definitions files include a header with the author and editors, so at some p * [AngularFire](https://www.firebase.com/docs/angular/reference.html) (by [Dénes Harmath](https://github.com/thSoft)) * [AngularJS](http://angularjs.org) (by [Diego Vilar](https://github.com/diegovilar)) ([wiki](https://github.com/borisyankov/DefinitelyTyped/wiki/AngularJS-Definitions-Usage-Notes)) * [angularLocalStorage](https://github.com/agrublev/angularLocalStorage) (by [Hiroki Horiuchi](https://github.com/horiuchi/)) +* [angular-spinner](https://github.com/urish/angular-spinner) (by [Marcin Biegała](https://github.com/Biegal)) * [AngularUI](http://angular-ui.github.io/) (by [Michel Salib](https://github.com/michelsalib)) * [Angular Hotkeys](https://github.com/chieffancypants/angular-hotkeys/) (by [Jason Zhao](https://github.com/jlz27)) * [Angular Protractor](https://github.com/angular/protractor) (by [Bill Armstrong](https://github.com/BillArmstrong)) diff --git a/angular-spinner/angular-spinner-tests.ts b/angular-spinner/angular-spinner-tests.ts new file mode 100644 index 000000000..cb50a9c37 --- /dev/null +++ b/angular-spinner/angular-spinner-tests.ts @@ -0,0 +1,12 @@ +/// + +var myApp = angular.module('testModule'); + +module AngularSpinnerTest { + var app = angular.module("angularSpinnerTest", ["angular-spinner"]); + + app.config(['usSpinnerService', function(usSpinnerService: ISpinnerService) { + usSpinnerService.spin('key1'); + usSpinnerService.stop('key2'); + }]); +} diff --git a/angular-spinner/angular-spinner.d.ts b/angular-spinner/angular-spinner.d.ts new file mode 100644 index 000000000..99784d38f --- /dev/null +++ b/angular-spinner/angular-spinner.d.ts @@ -0,0 +1,26 @@ +// Type definitions for angular-spinner.js 0.5.1 +// Project: https://github.com/urish/angular-spinner +// Definitions by: Marcin Biegała +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +/** +* SpinnerService +* see https://github.com/urish/angular-spinner +*/ +interface ISpinnerService { + /** + * Start selected spinner + * + * @param spinner key + */ + spin(key: string): void; + + /** + * Stop selected spinner + * + * @param spinner key + */ + stop(key: string): void; +}