Fix: Form is initially not available in $scope.
This commit is contained in:
parent
1aba5ccd2e
commit
79fe5b8612
|
@ -81,8 +81,7 @@ angular.module('ffffng')
|
||||||
var submitted = false;
|
var submitted = false;
|
||||||
|
|
||||||
$scope.hasError = function (field) {
|
$scope.hasError = function (field) {
|
||||||
var input = $scope.nodeForm[field];
|
return $scope.nodeForm && $scope.nodeForm[field].$invalid && submitted;
|
||||||
return input.$invalid && submitted;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var duplicateError = {
|
var duplicateError = {
|
||||||
|
|
Loading…
Reference in a new issue