4
양식에 입력 한 내용이 required tag
인데 제대로 작동하지만 제출 버튼에 데이터 제출시 양식을 숨기는 ng-click="visible = false"
이 있습니다.각도 JS HTML5 유효성 검사
모든 유효성 검사가 올바른 경우 어떻게 만 false로 설정할 수 있습니까?
$scope.newBirthday = function(){
$scope.bdays.push({name:$scope.bdayname, date:$scope.bdaydate});
$scope.bdayname = '';
$scope.bdaydate = '';
};
HTML
App.js :
<form name="birthdayAdd" ng-show="visible" ng-submit="newBirthday()">
<label>Name:</label>
<input type="text" ng-model="bdayname" required/>
<label>Date:</label>
<input type="date" ng-model="bdaydate" required/>
<br/>
<button class="btn" ng-click="visible = false" type="submit">Save</button>
</form>