prepare for angular 1.3

This commit is contained in:
Paulo Cesar
2014-08-19 03:03:59 -03:00
parent 17f8e5aca2
commit e49b7e4223

View File

@@ -267,12 +267,16 @@ declare module ng {
$dirty: boolean;
$valid: boolean;
$invalid: boolean;
$submitted: boolean;
$error: any;
$addControl(control: ng.INgModelController): void;
$removeControl(control: ng.INgModelController): void;
$setValidity(validationErrorKey: string, isValid: boolean, control: ng.INgModelController): void;
$setDirty(): void;
$setPristine(): void;
$commitViewValue(): void;
$rollbackViewValue(): void;
$setSubmitted(): void;
}
///////////////////////////////////////////////////////////////////////////
@@ -285,6 +289,13 @@ 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;
$validate(): void;
$setTouched(): void;
$setUntouched(): void;
$rollbackViewValue(): void;
$commitViewValue(revalidate?: boolean): void;
$isEmpty(value: any): boolean;
$viewValue: any;
$modelValue: any;
@@ -293,12 +304,23 @@ declare module ng {
$formatters: IModelFormatter[];
$viewChangeListeners: IModelViewChangeListener[];
$error: any;
$name: string;
$touched: boolean;
$untouched: boolean;
$validators: IModelValidators;
$pristine: boolean;
$dirty: boolean;
$valid: boolean;
$invalid: boolean;
}
interface IModelValidators {
[index: string]: (...args: any[]) => boolean;
}
interface IModelParser {
(value: any): any;
}
@@ -312,7 +334,7 @@ declare module ng {
}
///////////////////////////////////////////////////////////////////////////
// Scope and RootScope
// Scope and RootScope
// see https://docs.angularjs.org/api/ng/type/$rootScope.Scope and http://docs.angularjs.org/api/ng.$rootScope
///////////////////////////////////////////////////////////////////////////
interface IRootScopeService {