Merge pull request #3333 from martinmcwhorter/master

Defs for ngProgress
This commit is contained in:
Masahiro Wakame
2014-12-18 13:40:35 +09:00
3 changed files with 34 additions and 1 deletions

View File

@@ -285,7 +285,6 @@ declare module ng {
// Documentation states viewValue and modelValue to be a string but other
// types do work and it's common to use them.
$setViewValue(value: any): void;
$setPristine(): void;
$viewValue: any;
$modelValue: any;

View File

@@ -0,0 +1,14 @@
/// <reference path="./ngprogress.d.ts" />
var ngProgress: NgProgress.INgProgress = <any> {};
ngProgress.start();
ngProgress.height('10px');
ngProgress.color('red');
var statusResult: number = ngProgress.status();
ngProgress.stop();
ngProgress.set(50);
ngProgress.reset();
ngProgress.complete();

20
ngprogress/ngprogress.d.ts vendored Normal file
View File

@@ -0,0 +1,20 @@
// Type definitions for ngProgress 1.0.7
// Project: http://victorbjelkholm.github.io/ngProgress/
// Definitions by: Martin McWhorter <https://github.com/martinmcwhorter>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module NgProgress {
export interface INgProgress {
start(): void;
height(height: string): void;
color(color: string): void;
status(): number;
stop(): void;
set(value: number): void;
reset(): void;
complete(): void;
}
}