Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<form class="form-horizontal" name="reviewForm"
ng-controller="ReviewController as reviewCtrl"
ng-submit="reviewCtrl.addReview(product)">
<blockquote>
<b>{{reviewCtrl.review.stars}} star(s)</b>
{{reviewCtrl.review.body}}
<cite>- {{reviewCtrl.review.author}}</cite>
</blockquote>
<div class="form-group">
<label class="col-sm-1 control-label">Email</label>
<div class="col-sm-6">
<input ng-model="reviewCtrl.review.author" type="email" class="form-control" placeholder="Email">
</div>
</div>
<div class="form-group">
<label class="col-sm-1 control-label">Review</label>
<div class="col-sm-6">
<textarea ng-model="reviewCtrl.review.body" class="form-control" rows="3"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-1 control-label">Star</label>
<div class="col-sm-6">
<select ng-model="reviewCtrl.review.stars" class="form-control">
<option value="1">1 star</option>
<option value="2">2 stars</option>
<option value="3">3 stars</option>
<option value="4">4 stars</option>
<option value="5">5 stars</option>
</select>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-1 col-sm-10">
<button type="submit" class="btn btn-default">Gửi</button>
</div>
</div>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment