I\'m using ionic and I have the following view:
$scope.user = {}; $scope.submitForm = function (isValid) { if (($scope.user.name || '').length > 0){ //Code } }