Famous / famous-angular

Bring structure to your Famo.us apps with the power of AngularJS. Famo.us/Angular integrates seamlessly with existing Angular and Famo.us apps.
https://famo.us/angular
Mozilla Public License 2.0
1.92k stars 275 forks source link

Using ng-if causes angular $animate error #300

Closed DrClick closed 9 years ago

DrClick commented 9 years ago

if you use an ng-if with famous angular, this error is thrown: Cannot read property 'then' of undefined at Object.ngIfWatchAction as fn at Scope.$digest (http://localhost:8000/lib/angular/angular.js:14133:29) at Scope.$apply (http://localhost:8000/lib/angular/angular.js:14395:24) at done (http://localhost:8000/lib/angular/angular.js:9569:47) at completeRequest (http://localhost:8000/lib/angular/angular.js:9756:7) at XMLHttpRequest.requestLoaded (http://localhost:8000/lib/angular/angular.js:9697:9)

zackbrown commented 9 years ago

Hey @DrClick I am not able to reproduce this. Can you set this up in a codepen? Also, which version of F/A are you using? The F/A animation logic has returned promises since 132c4ce2782ae1d0dc53c13de7ea2cb5723f39c9 , and that commit is included in 0.5.0. If you want full Angular 1.3 support, I would recommend working off of F/A at master (0.6.0 should be cut soon.)

ghaiat commented 9 years ago

Hello I m having the exact same issue using the latest master....

Btw do you have a starter codepen template with all the depencies? the references i was using are not working anymore ...

ghaiat commented 9 years ago

Hey @zackbrown Any update? i am facing this issue any time i am using an ng-if

zackbrown commented 9 years ago

Hey @ghaiat — I just went ahead and put together a codepen template for F/A: http://codepen.io/zackbrown/pen/yyVQje (I put the current master onto the CDN preemptively as 0.6.0, though that CDN endpoint is subject to change until the release is actually cut.)

I also put together one that uses ng-if and it seems to be working correctly. http://codepen.io/zackbrown/pen/ogYQyq . I tried the ng-if on a surface, on its parent modifier, and on the content of the surface (in this case, an img tag) and none of them threw errors. Are either you or @DrClick able to reproduce your error scenarios by modifying that codepen?

ghaiat commented 9 years ago

I update to the latest master and it s working fine Thanks

jordanpapaleo commented 9 years ago

Good to hear! I am closing this issue.