http://www.yearofmoo.com/2014/05/how-to-use-ngmessages-in-angularjs.html