AngularJs .$setPristine to reset form

后端 未结 6 655
耶瑟儿~
耶瑟儿~ 2020-12-05 09:15

I been struggling to reset form once form is submitted. Someone posted this Here which I want to make it work but no success. Here is my My Code Example.

$scop

6条回答
  •  执念已碎
    2020-12-05 09:48

    $setPristine() was introduced in the 1.1.x branch of angularjs. You need to use that version rather than 1.0.7 in order for it to work.

    See http://plnkr.co/edit/815Bml?p=preview

提交回复
热议问题