drewwyatt
drewwyatt

Reputation: 6027

How can I prevent angular from validating a form when certain buttons are clicked?

Angular seems to be firing validation messages when ANY button within form $scope is clicked. Is there a directive that can be applied to a <button> that will prevent this?

Upvotes: 0

Views: 40

Answers (1)

Brocco
Brocco

Reputation: 65043

All elements are considered to be of type submit by default.

use this to prevent form submissions:

<button type="button"> 

Upvotes: 1

Related Questions