Pratik,

That looks great, but I think I'm solving something slightly different at the moment:

In a nutshell it comes down to clearing an error, then putting up another the next time. Right now jquery is deleting that part of the DOM to clear the error, so it's gone the next time I need it. 

In order to solve that and keep the existing parts of the site working that use jquery, I have to use a different css class name to do my formatting, essentially hiding my DOM elements from the jquery that's trying to delete my error elements.

I think I have this solved for now, but your code below will be useful in the next step. Thanks! :)

/k

On Apr 1, 2013, at 12:45 PM, Pratik Khadloya wrote:

> In app/views/shared/_hubModal.html.haml:
> 
> >    .modal-header
> >      .pull-right= link_to raw('&times;'), '#', class: 'close', data: {dismiss: 'modal'}
> >      %h3 Create a new Group
> > +    .container(ng-class="alertclass")
> I suggest that instead of trying to manupulate the DOM ourselves we can probably give it to Angular using the *ng-class* directive and let it take care of it.  *ng-class* Conditionally applying classes to elements is another thing commonly done manually using jQuery. Angular, of course, has a better way. You can give ng-class a whitespace-separated set of class names, and then it's identical to ordinary class. That's not very exciting, so there's a second syntax:  <div ng-class="{ errorClass: isError, warningClass: isWarning, okClass: !isError && !isWarning }">...</div>
> …
> —
> Reply to this email directly or view it on GitHub.
>