var original = $scope.user;
when resetting :
$scope.user= angular.copy(original);
$scope.userForm.$setPristine();
remove
type="reset" in <button>
here is the Angular Documentation for form controllers.
More Related Contents:
- How to validate inputs dynamically created using ng-repeat, ng-show (angular)
- Angular form validation ng-disabled not working
- My form’s validate() is not working
- HTML5 form required attribute. Set custom validation message?
- Can one AngularJS controller call another?
- How to get the raw value an field?
- AngularJS Error: Cross origin requests are only supported for protocol schemes: http, data, chrome-extension, https
- Losing scope when using ng-include
- AngularJS: No “Access-Control-Allow-Origin” header is present on the requested resource [duplicate]
- How to make ng-bind-html compile angularjs code
- What is the correct syntax of ng-include?
- Ternary operator in AngularJS templates
- angularjs to output plain text instead of html
- AngularJS – ng-disabled not working for Anchor tag
- Set active tab style with AngularJS
- Image loaded event in for ng-src in AngularJS
- Template does not update when using ui-router and ion-tabs
- How do I disable the save password bubble in chrome using Javascript?
- How to Call a JS function using OnClick event [duplicate]
- Enable/Disable submit button if checkbox is checked/unchecked?
- show validation error messages on submit in angularjs
- AngularJS – placeholder for empty result from filter
- Webstorm: “Cannot Resolve Directory”
- How can I invoke encodeURIComponent from angularJS template?
- How to highlight a part part of an Input text field in HTML using Javascript or JQuery
- Rename Object Key in an array using javascript
- input:invalid css rule is applied on page load
- How can I void a form action and execute jQuery when all HTML form elements are validated?
- Decode HTML entity in Angular JS
- Check if a browser has built-in HTML form validation?