jrief/django-angular — pull request #132 by jamesbrobb (2014-11-26 15:49:05+00:00)
Title: ngMessages support

Hi Jacob, i've just updated my forms to use ngMessages and was wondering if it's something you think would be useful for the project?

It adds a better flow for dealing with server errors, using a 'rejected' validator to display a returned field error. Plus there's also a significant reduction in watchers. I have 3 forms with a total of 9 fields and have seen a reduction of 40.

One thing to note is that ngMessages are dependent on angular 1.3+

The new logic consists of:

A new TupleErrorList - NgMessagesTupleErrorList
A django filter to add the validator to the input - although there might be a better solution for this?
An angular service to process and apply the errors
An angular 'rejected' validator directive

Anyway, let me know what you think?