I am trying to print text on the page in a <h1> tag depending on whether a check box is checked or not.
$scope.EmailMe = function(email) {
if($scope.emailchecked == 1) {
$scope.test = "emailSent";
} else {
$scope.test = "nothing";
}
}
HTML is :
<input type="checkbox" ng-model="emailchecked" ng-change="EmailMe(1)">
<h1> @{{test}} </h1>
I have the text printing but the checkbox is not being checked. or allowing for change please help :)
0&1value in the checkbox?