How can I globally extend the native Angular FormController with additional methods?
For example, I would like my forms to have an additional method setNew()
(similar to already existing $setPristine()
, etc). Right now I am doing this in each controller but I'd like it available throughout the app without declaring it all over the place.