MCPcopy
hub / github.com/angular-ui/ui-router / FormController

Function FormController

test/angular/1.7/angular.js:24523–24542  ·  view source on GitHub ↗
($element, $attrs, $scope, $animate, $interpolate)

Source from the content-addressed store, hash-verified

24521//asks for $scope to fool the BC controller module
24522FormController.$inject = ['$element', '$attrs', '$scope', '$animate', '$interpolate'];
24523function FormController($element, $attrs, $scope, $animate, $interpolate) {
24524 this.$$controls = [];
24525
24526 // init state
24527 this.$error = {};
24528 this.$$success = {};
24529 this.$pending = undefined;
24530 this.$name = $interpolate($attrs.name || $attrs.ngForm || '')($scope);
24531 this.$dirty = false;
24532 this.$pristine = true;
24533 this.$valid = true;
24534 this.$invalid = false;
24535 this.$submitted = false;
24536 this.$$parentForm = nullFormCtrl;
24537
24538 this.$$element = $element;
24539 this.$$animate = $animate;
24540
24541 setupValidity(this);
24542}
24543
24544FormController.prototype = {
24545 /**

Callers

nothing calls this directly

Calls 2

$interpolateFunction · 0.70
setupValidityFunction · 0.70

Tested by

no test coverage detected