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

fix(ngAnimate): throw an error if a callback is passed to animate met…#11854

Closed
petebacondarwin wants to merge 2 commits into
angular:masterfrom
petebacondarwin:animate-no-callback
Closed

fix(ngAnimate): throw an error if a callback is passed to animate met…#11854
petebacondarwin wants to merge 2 commits into
angular:masterfrom
petebacondarwin:animate-no-callback

Conversation

@petebacondarwin

Copy link
Copy Markdown
Contributor

…hods

As of bf0f550 (released in 1.3.0) it is no longer
valid to pass a callback to the following functions: enter, move, leave, addClass,
removeClass, setClass and animate.

To prevent confusing error messages, this change asserts that this parameter is
not a function.

Closes #11826
Closes #11713

…hods

As of bf0f550 (released in 1.3.0) it is no longer
valid to pass a callback to the following functions: `enter`, `move`, `leave`, `addClass`,
`removeClass`, `setClass` and `animate`.

To prevent confusing error messages, this change asserts that this parameter is
not a function.

Closes angular#11826
Closes angular#11713
@Narretz

Narretz commented May 11, 2015

Copy link
Copy Markdown
Contributor

LGTM
Although for the record I prefer to not do anything here at all. It's a documented BC.

@petebacondarwin

Copy link
Copy Markdown
Contributor Author

Trouble is that not doing anything leads to a very confusing error, which is hard to track down to having left this callback in place.

One thing missing here is actually the error doc. I will add it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we mention that the last parameter now takes the option object?

@matsko

matsko commented May 12, 2015

Copy link
Copy Markdown
Contributor

@petebacondarwin make sure to retrofit both the assertion code and the docs so that it can be merged into the 1.3 branch as well.

@petebacondarwin

Copy link
Copy Markdown
Contributor Author

@matsko - by retrofit you mean backport?

@matsko

matsko commented May 12, 2015

Copy link
Copy Markdown
Contributor

Yessir

@matsko

matsko commented May 14, 2015

Copy link
Copy Markdown
Contributor

Landed as 9804867 and 0515614

@matsko matsko closed this May 14, 2015
@petebacondarwin petebacondarwin deleted the animate-no-callback branch November 24, 2016 09:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(bug) ngAnimate options.domOperation is not a function

3 participants