Skip to content

Animation transition void => * doesn't work on the first page #1518

Open
@andreypelykh

Description

@andreypelykh

If there is no issue for your problem, tell us about it

I want to use this simple animation:

animations: [
  trigger('flyInOut', [
    state('in', style({ transform: 'translateX(0)' })),
    transition('void => *', [
      style({ transform: 'translateX(100)' }),
      animate(1000)
    ]),
    transition('* => void', [
      animate(1000, style({ transform: 'translateX(-100)' }))
    ])
  ])
]

I try to setup it in a component which is rendered on the default route and the animation doesn't fire. Transition 'void => *' doesn't work on the first load.
@flyInOut.start and @flyInOut.done events occur properly, but animation is not visible in the view. And animated element remains in transform: 'translateX(100)' state.

The problem occurs only on Android.

Please, provide the following version numbers that your issue occurs with:

  • CLI: 4.2.3
  • Cross-platform modules: 4.2.0
  • Runtime(s): 4.2.0
  • Plugin(s):
  "dependencies": {
    "@angular/animations": "~6.1.0",
    "@angular/common": "~6.1.0",
    "@angular/compiler": "~6.1.0",
    "@angular/core": "~6.1.0",
    "@angular/forms": "~6.1.0",
    "@angular/http": "~6.1.0",
    "@angular/platform-browser": "~6.1.0",
    "@angular/platform-browser-dynamic": "~6.1.0",
    "@angular/router": "~6.1.0",
    "nativescript-angular": "^6.1.0",
    "nativescript-theme-core": "~1.0.4",
    "reflect-metadata": "~0.1.10",
    "rxjs": "^6.0.0",
    "tns-core-modules": "^4.2.0",
    "zone.js": "^0.8.26"
  },
  "devDependencies": {
    "@angular/compiler-cli": "~6.1.0",
    "@ngtools/webpack": "~6.2.0",
    "@types/chai": "~4.1.3",
    "@types/mocha": "~5.2.1",
    "@types/node": "^7.0.5",
    "babel-traverse": "6.25.0",
    "babel-types": "6.25.0",
    "babylon": "6.17.4",
    "lazy": "1.0.11",
    "nativescript-css-loader": "~0.26.0",
    "nativescript-dev-appium": "next",
    "nativescript-dev-typescript": "^0.7.3",
    "nativescript-dev-webpack": "^0.16.0",
    "typescript": "~2.7.2"
  },

Please, tell us how to recreate the issue in as much detail as possible.

Launch playground app on android device.

Is there any code involved?

https://play.nativescript.org/?template=play-ng&id=ZoWGlW

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions