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

Error with ng-show on fa-app #275

Closed pencilcheck closed 9 years ago

pencilcheck commented 9 years ago

This is the error log:

TypeError: undefined is not a function
    at http://localhost:8080/lib/famous-angular/dist/famous-angular.js:465:29
    at Object.forEach (http://localhost:8080/lib/angular/angular.js:325:18)
    at Object.angular.forEach.animationHandlers.(anonymous function) [as removeClass] (http://localhost:8080/lib/famous-angular/dist/famous-angular.js:460:23)
    at Object.ngShowWatchAction [as fn] (http://localhost:8080/lib/angular/angular.js:20802:62)
    at Scope.$get.Scope.$digest (http://localhost:8080/lib/angular/angular.js:12540:29)
    at Scope.$get.Scope.$apply (http://localhost:8080/lib/angular/angular.js:12805:24)
    at done (http://localhost:8080/lib/angular/angular.js:8378:45)
    at completeRequest (http://localhost:8080/lib/angular/angular.js:8592:7)
    at XMLHttpRequest.xhr.onreadystatechange (http://localhost:8080/lib/angular/angular.js:8531:11)
zackbrown commented 9 years ago

Hey @pencilcheck — it looks like this is an edge-case we haven't handled yet with ngAnimate and F/A's show/hide solution and thus ng-show is not yet supported on fa-app.

A simple workaround for now would be to wrap the fa-app in a div and put an ng-show on that div. Alternatively, create an fa-view as a parent of everything inside your fa-app and add the ng-show to that.

pencilcheck commented 9 years ago

That works, thanks! But I hope this can be fixed soon. :)