Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="container" ng-controller="DishDetailController">
- A bunch of shit here to display the original array.
- <!--- The new form submission part -->
- <div class="row" ng-controller="CommentsController">
- <div class="col-xs-12 col-sm-9">
- <blockquote ng-show="!commentsForm.$pristine && !commentsForm.$invalid">
- <p>{{newcomment.rating}} Stars</p>
- <p>{{newcomment.comment}}</p>
- <footer>
- <cite title="Comment Author">{{newcomment.author}}</cite>
- </footer>
- </blockquote>
- </div>
- <div class="col-xs-12 col-sm3"></div>
- <form class="form-horizontal" role="form" name="commentsForm" ng-submit="submitComment()" novalidate>
- <div class="form-group" ng-class="{ 'has-error' : commentsForm.author.$error.required && !commentsForm.author.$pristine }">
- <label for="author" class="col-sm-2 control-label">Your Name</label>
- <div class="col-sm-10">
- <input type="text" class="form-control" id="author" name="author" placeholder="Please Enter Your Name" ng-model="newcomment.author" required>
- <span ng-show="commentsForm.author.$error.required && !commentsForm.author.$pristine" class="help-block">You Must Enter your name</span>
- </div>
- </div>
- <div class="form-group">
- Radio buttons Here
- </div>
- <div class="form-group" ng-class="{ 'has-error' : commentsForm.comment.$error.required && !commentsForm.comment.$pristine }">
- <label for="comment" class="col-sm-2 control-label">Comments</label>
- <div class="col-sm-10">
- <textarea class="form-control" name="comment" id="comment" placeholder="Your Comments" ng-model="newcomment.comment" required></textarea>
- <span ng-show="commentsForm.comment.$error.required && !commentsForm.comment.$pristine" class="help-block">You Must Enter Comments</span>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2"></div>
- <div class="col-sm-10">
- <button type="submit" class="btn btn-primary" ng-disabled="commentsForm.$invalid">Submit Comment</button>
- </div>
- </div>
- </form>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement