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;
|
||||
|
||||
$scope.hasError = function (field) {
|
||||
var input = $scope.nodeForm[field];
|
||||
return input.$invalid && submitted;
|
||||
return $scope.nodeForm && $scope.nodeForm[field].$invalid && submitted;
|
||||
};
|
||||
|
||||
var duplicateError = {
|
||||
|
|
Loading…
Reference in a new issue