angular: Router Animation query empty list error
I’m submitting a … (check one with “x”)
[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior
Errors
`query(":enter")` returned zero elements. (Use `query(":enter", { optional: true })` if you wish to allow this.)
`query(":leave")` returned zero elements. (Use `query(":leave", { optional: true })` if you wish to allow this.)
Expected behavior Animation
Minimal reproduction of the problem with instructions http://plnkr.co/edit/8Q4OGqtLtSzRi7xqyGAL?p=preview Switch between page1 and page2
-
Angular version: 4.2.0-rc.0
-
Browser: Chrome (at least)
-
Language: TypeScript 2.2.1 (or 2.3.2) does not matter
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 23 (10 by maintainers)
If you append an
{optional: true}
object as the last parameter of thequery()
function then the error goes away.i.e.
However, the animation still doesn’t fire on route change 😦
Awesome … many thanks @matsko…
When is the next release due? Will it be another RC?
@dharders Thanks for translate English to English )
@matsko Very similar example was created by stevenmyhre: http://plnkr.co/edit/5nGn32ABLtNNb3kaAhBF?p=preview I’ll try to make my own example tomorrow.