Limit for animations query is not applied

112 Views Asked by At

According to the query function documentation in the Angular animations package, you can supply an optional parameter limit. To my understanding, with limit: 5, only the first five elements that are found will be animated.

When I use query with limit: 1, only the first element is animated, but with any other number all elements will be animated.

See this plunker

transition(':enter', [
    query('p', [
      style({transform: 'translateY(-100px)', opacity: 0}),
      animate('1s', style('*'))
    ], {limit: 2})
  ])
1

There are 1 best solutions below

0
On BEST ANSWER

It was a bug and was fixed with this PR. The provided plunker now works as expected.