It won’t have much impact if you write it like this now. If your judgment expression is too long, you can consider writing it as a function and calling the function directly
For example:
$scope.someFun(){ return $scope.submitted && $scope.form.$invalid; } ng-disabled="someFun()"
getter defines a submitDisabled, and then performs rule determination internally.
get submitDisabled() { return submitted && form.$invalid }
It won’t have much impact if you write it like this now. If your judgment expression is too long, you can consider writing it as a function and calling the function directly
For example:
getter defines a submitDisabled, and then performs rule determination internally.