AngularJS graphic array on $ scope does not update view

I am using angular-change madmimi (this is an angular port for jQuery of the base zurb part) and I am running into little problems with the Alert directive.

I have a contact form with alerts at the top. These warnings are displayed using ng-repeat on the array found in scope. (Scope.alerts $). when i click the alert it appears immediately. But when I try to remove it using the in scope function ($ scope.close ()), the ng-repeat view is not updated. It clearly calls the function correctly and when I register the array after that it successfully removed the warning.

$ scope. $ apply throws error $ apply is already executing (this is ok as I am calling everything from angular context).

Another oddity is that when I enter something into one of the form fields (which are bound to another scope object with an ng-model), the ng-repeat view is updated.

who can help me? debugged this for hours with no success :(

early

EDIT:

I created a little JSFiddle at first, but everything worked fine there (as it did on the angular-foundation demo site), so I decided to release a live demo of my project, as there are some other libraries used in the project, as well as more rigid controllers, etc. . then a consolidated JSFiddle will exist.

I have stripped most of the parts that have nothing to do with the problem, so these are just two small controllers and some route settings for the js part.

The demo can be found at: VG Demo

Play: Scroll down to the contact form, click a button in some random data, hit "verzenden" and a warning will appear. Press the X on the right and, as you can see, no magic happens. If you are doing magic, just make one of the fields you just filled blank and you will see the alert close.

The code can be easily seen by examining the source.

Thank you in advance

+3


source to share





All Articles