This is my code:
<input type="password" id="centraPassword" placeholder="Enter Centra Password" class="form-control" ng-model="centraPassword" />
<label>
<input type="checkbox" ng-model="centrapasswordcheck" >
I have a Centra Travels password
</label>
<button type="submit" class="btn btn-info" ng-disabled="continueEmailButton" id="btnContinue" ng-click="ContinueDetails()">Continue</button>
This is my angularjs Code:
$scope.ContinueDetails = function () {
if ($scope.centrapasswordcheck == true)
{
if ($scope.centraPassword == '' || $scope.centraPassword == null) {
alert("please enter your password")
return;
}
}
}
In the above code when I click the Continue button, first check the checkbox checked or not after it will check enter the password or not.