I am a beginner in Angular and I am attempting to create a simple blacklist check. Currently, I have two texts that I can toggle between showing and hiding using ng-show. The first text should be displayed when the email pattern is incorrect, and hidden when it is correct and/or on a blacklist.
My issue lies in not knowing how to properly implement the model. Right now, it is mimicked by a checkbox. Any tips or suggestions would be greatly appreciated.
<div class="controls">
<input type="checkbox" ng-model="checked" ng-init="checked=true" /><br/>
<input type="email" id="inputEmail" placeholder="Email" ng-model="email" required>
<div class="hint">
<h4 name="mailValidator" ng-if="checked" ng-show="true">Invalid Email</h4>
<h4 name="checkBlacklist" ng-if="!checked" ng-show="true">Email is not allowed</h4>
</div>