Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function ContactCtrl() {
- var vm = this;
- vm.reset = reset;
- vm.submit = submit;
- function reset(form) {
- if (form) {
- vm.name = undefined;
- vm.email = undefined;
- form.$setValidity();
- form.$setPristine();
- form.$setUntouched();
- }
- }
- function submit(form) {
- if (form) {
- vm.reset(form);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement