I currently have the following code snippet:
<form name="editor">
<h2>Create/Update</h2>
{{ editor.title.$error.required }}
<div ng-class="{ 'has-error': editor.title.$invalid && editor.title.$dirty, 'has-success': editor.title.$valid }" class="form-group">
<input type="text" name="title" ng-model="project.title" placeholder="title" required class="form-control">
<span class="input-icon fui-check-inverted" ng-show="editor.title.$valid"></span>
</div>
{{ editor.description.$error.required }}
<div ng-class="{ 'has-error': editor.description.$invalid && editor.description.$dirty, 'has-success': editor.description.$valid }" class="form-group">
<textarea name="description" ng-model="project.description" placeholder="description" required class="form-control"></textarea>
<span class="input-icon fui-check-inverted" ng-show="editor.description.$valid"></span>
</div>
<button ng-click="save()" type="submit" class="btn btn-primary btn-embossed">Save</button>
<button type="reset" class="btn btn-inverse">Reset</button>
<a href="#/">Back</a>
</form>
I am currently following a tutorial on "JavaScript Projects" from the main page of Angular's website. I recently added a reset button to detail.html, but I am facing an issue with its behavior. Whenever I manually clear the fields, the validation fails. However, when I click on the reset button, the fields are cleared but the form remains valid. Could this be a bug in Angular? How can I resolve this issue?