Last active
December 30, 2015 22:19
-
-
Save kfiil/7893322 to your computer and use it in GitHub Desktop.
Clearing a Form in AngularJS(1.2.x) (#JavaScript #AngularJS)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Source http://blog.hugeaim.com/2013/04/07/clearing-a-form-with-angularjs/ | |
//make the record pristine | |
$scope.commentForm.$setPristine(); | |
$scope.comment = {..}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment