I'm using angular-foundation by madmimi (it's a angularjs port for the jquery part of zurb foundation) and I've ran into a bit of trouble with the Alert directive.
I have a contact form with alerts in the top. These alerts are shown using ng-repeat on an Array found on the scope. ($scope.alerts). when I push an alert, it shows up immediately. But when I try to remove it using a function on the scope ($scope.close()) the ng-repeat view does not update. It clearly calls the function correctly and when I log the array afterwards it has succesfully deleted the alert.
$scope.$apply throws an error $apply is already in progress(which is normal, as I call everything from within an angular context).
Another weird thing is, when I type something into one of the form fields(which are binded to another scope object with ng-model) the ng-repeat view get updated..
anyone who can help me with this? been debugging this for hours now without success :(
thanks in advance
EDIT:
First I created a little JSFiddle, but everything worked fine in there (just as it does on the demo site of angular-foundation) so I decided to put up a live demo of my project as there are some other libs used in the project as well as beefier controllers and stuff then there would be in a consolidated JSFiddle.
I stripped most of the parts that have nothing to do with the problem so it's just 2 small controllers and some route settings for the js part.
Demo can be found at: VG Demo
To reproduce: scroll down to the contact form, button mash in some random data, press "verzenden" and there will pop up an alert. Press the X on the right and as you can see, no magic happening. If you do like magic, just make one of the fields you just filled in blank and you'll see the alert closes.
The code can easily be seen by inspecting the source.
Thanks in advance