AngularTS
    Preparing search index...

    Interface NgModelController

    Controller API for ngModel directive.

    interface NgModelController {
        $viewValue: any;
        $commitViewValue(): void;
        $isEmpty(value: any): boolean;
        $overrideModelOptions(options: NgModelOptions): void;
        $processModelValue(): void;
        $render(): void;
        $rollbackViewValue(): void;
        $setDirty(): void;
        $setPristine(): void;
        $setTouched(): void;
        $setUntouched(): void;
        $setValidity(validationErrorKey: string, isValid: boolean): void;
        $setViewValue(value: any, trigger?: string): void;
        $validate(): void;
    }
    Index

    Properties

    $viewValue: any

    Current value shown in the view

    Methods

    • Commits the current view value to the model

      Returns void

    • Determines if value is considered empty

      Parameters

      • value: any

      Returns boolean

    • Processes view-to-model transformations

      Returns void

    • Updates the view when the model changes

      Returns void

    • Rolls back to previous view value

      Returns void

    • Marks the control as dirty

      Returns void

    • Marks the control as pristine

      Returns void

    • Marks the control as touched

      Returns void

    • Marks the control as untouched

      Returns void

    • Sets the validity state of the control

      Parameters

      • validationErrorKey: string
      • isValid: boolean

      Returns void

    • Updates the model value

      Parameters

      • value: any
      • Optionaltrigger: string

      Returns void

    • Re-validates the model

      Returns void