Currently working on an AngularJS demo to better understand its functionalities. The next task on my list is to enable the submit button only when a valid email address is entered. I'm seeking guidance on how to approach this and what concepts I need to grasp to make it work. Examples or suggestions would be highly appreciated.
This is the current setup:
I have a ui-view
:
<div ui-view></div>
Within this view, I load my main template:
app.config:
$stateProvider
.state('route1', {
url: "/ID/:slug",
templateUrl: "/static/sign_up.html",
controller: "myData"
})
The 'myData' function just handles some ajax calls.
Template sign_up.html:
<h1>{{ data.name }}</h1>
<form action="">
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<label class="col-lg-3 control-label" for="id_email">Email
*</label>
<div class="col-lg-9">
<input class="form-control" id="id_email" name="email"
type="text">
</div>
</div><button class="btn btn-lg" type="submit">Submit</button>
</div>
</div>
</form>