最佳答案
我需要检查表单在控制器中是否有效。
观看内容:
<form novalidate=""
name="createBusinessForm"
ng-submit="setBusinessInformation()"
class="css-form">
<!-- fields -->
</form>
在我的控制器里:
.controller(
'BusinessCtrl',
function ($scope, $http, $location, Business, BusinessService,
UserService, Photo)
{
if ($scope.createBusinessForm.$valid) {
$scope.informationStatus = true;
}
...
我得到了这个错误:
TypeError: Cannot read property '$valid' of undefined