Skip to content

Height based animation within ng-content using *ngIf causes error #13395

Description

@pmb5

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
When using a height based animation within ng-content where the ng-Content uses *ngIf we get an error:

NotSupportedError: Failed to execute 'animate' on 'Element': Partial keyframes are not supported.

If I move the *ngIf to the template the error goes away

Expected behavior
I should be able to use *ngIf on ng-content and within my template use height based animations without error

Minimal reproduction of the problem with instructions

Plunk with the error:
https://embed.plnkr.co/HbjFK2hHel2KiOigzw1t/

Plunk with a hack to get it working. I moved the *ngIf directive from ng-content in accordion-panel.component to the template in app.ts
https://embed.plnkr.co/dRGyNT1f2uB8qPW6UahE/

Please tell us about your environment:

  • Angular version: > 2.1.0
  • Browser: [all]
  • Language: [all]

  • Node (for AoT issues): node --version =

Metadata

Metadata

Assignees

Labels

area: animationslegacy animations package only. Otherwise use area: core.

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions