且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

AngularJS 检查表单在控制器中是否有效

更新时间:2023-02-19 11:56:43

我已将控制器更新为:

.controller('BusinessCtrl',
    function ($scope, $http, $location, Business, BusinessService, UserService, Photo) {
        $scope.$watch('createBusinessForm.$valid', function(newVal) {
            //$scope.valid = newVal;
            $scope.informationStatus = true;
        });
        ...