Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

bug($animate): Missing setClass method #6460

Closed
willfarrell opened this issue Feb 26, 2014 · 9 comments
Closed

bug($animate): Missing setClass method #6460

willfarrell opened this issue Feb 26, 2014 · 9 comments

Comments

@willfarrell
Copy link

Using <div class="filter {{boolVar ? 'filter-disabled' : 'filter-default'}}"></div> for example consoles out the error below in 1.2.13, but not in 1.2.12.

TypeError: Object #<Object> has no method 'setClass'
    at Object.Attributes.$updateClass (http://localhost:8080/bower_components/angular/angular.js:5431:20)
    at Object.interpolateFnWatchAction (http://localhost:8080/bower_components/angular/angular.js:6614:28)
    at Object.applyFunction [as fn] (<anonymous>:778:50)
    at Scope.$digest (http://localhost:8080/bower_components/angular/angular.js:11898:29)
    at Scope.$delegate.__proto__.$digest (<anonymous>:844:31)
    at Scope.$apply (http://localhost:8080/bower_components/angular/angular.js:12151:24)
    at Scope.$delegate.__proto__.$apply (<anonymous>:855:30)
    at done (http://localhost:8080/bower_components/angular/angular.js:7909:45)
    at completeRequest (http://localhost:8080/bower_components/angular/angular.js:8110:7)
    at XMLHttpRequest.xhr.onreadystatechange (http://localhost:8080/bower_components/angular/angular.js:8053:11) 

Was there a breaking change in 1.2.13 that would cause this?

@willfarrell
Copy link
Author

related to #6419.

@matsko
Copy link
Contributor

matsko commented Feb 26, 2014

Yes. setClass was introduced, but it shouldn't effect the JS animations in the upcoming 1.2.14.

Looks like somewhere in your code there's a miscommunication between ng and ngAnimate. Are both the angular.js and angular-animate.js of the same version? setClass is defined in both $animate files.

@matsko
Copy link
Contributor

matsko commented Feb 26, 2014

@willfarrell can you double check that both your JS files are on the same version (1.2.13) and if the error is caused?

@willfarrell
Copy link
Author

Turns out angular-animate version was miss matched with the angular version. Looks like bower was eager to include the latest and greatest. Both at 1.2.13 does not produce the error. Thanks for the fast help.

@matsko
Copy link
Contributor

matsko commented Feb 26, 2014

Awesome. Thank you.

@matsko matsko closed this as completed Feb 26, 2014
@theredpea
Copy link

+1

@matsko
Copy link
Contributor

matsko commented Mar 14, 2014

@theredpea you're not experiencing anything similar are you?

@theredpea
Copy link

Sorry, I should clarify:
I was experiencing something similar;
But your diagnosis (mismatched versions) was correct;
And so I could easily fix via links at http://code.angularjs.org/
I was a bit spun around having looked at too many angular animate tutorials
for different versions,
Never thinking version consistency itself is issue :)
Thanks

Nathaniel Muir Anderson, CPA
P: (213)814-8942
E: nate.muir.anderson@gmail.com
A: 1045 W Radcliff Ave | Englewood, CO | 80110

On Thu, Mar 13, 2014 at 10:06 PM, Matias Niemelä
notifications@git.luolix.topwrote:

@theredpea https://github.com/theredpea you're not experiencing
anything similar are you?

Reply to this email directly or view it on GitHubhttps://github.com//issues/6460#issuecomment-37615069
.

@sethreidnz
Copy link

I am experiencing this exact issue myself. I have created a branch of my project you can get from gitbhub:

https://github.com/justsayno/fhf-demo.git

The branch is "ngAnimateIssue"

I have a working app (if you run npm start you can run it) but as soon as I dd ngapp as a dependency it falls over with the error

$animate.setClass is not a function

It could be a version issue but I am unsure how exactly to diagrose that as when I do bower list I get

fhf-demo#0.0.0 D:\dev\fhf-demo
├── angular#1.2.28 (1.2.29-build.592+sha.b041b66 available, latest is 1.4.0-rc.2
)
├─┬ angular-loader#1.2.28 (1.2.29-build.592+sha.b041b66 available, latest is 1.4
.0-rc.2)
│ └── angular#1.2.28 (latest is 1.4.0-rc.2)
├── angular-local-storage#0.2.1
├─┬ angular-mocks#1.2.28 (1.2.29-build.592+sha.b041b66 available, latest is 1.4.
0-rc.2)
│ └── angular#1.2.28
├─┬ angular-route#1.2.28 (1.2.29-build.592+sha.b041b66 available, latest is 1.4.
0-rc.2)
│ └── angular#1.2.28
├─┬ bootstrap#3.3.4
│ └── jquery#2.1.4
├── font-awesome#4.3.0
└── ngAnimate#750f243cf9

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants