Skip to content

nativescript-angular/animations with AOT #1247

Closed

Description

@jolafrite

I created multiple animations using the nativescript-angular/animations.
But when I compile the app using AOT, the animations are not showing anymore.

Do you have a demo where animations work with AOT ?

tns run ios --device 1 --bundle --env.uglify
without-aot

tns run ios --device 1 --bundle --env.aot --env.uglify
with-aot

Activity

  1. jolafrite commented on Mar 21, 2018

    @jolafrite
    Author

    I just found a difference between without AOT and with AOT

    Without AOT the AnimationPlayer instance is AnimationRenderer
    With AOT the AnimationPlayer instance is BaseAnimationRenderer

  2. jolafrite commented on Mar 21, 2018

    @jolafrite
    Author

    one more update
    with the following line :

    this._renderer = rootRenderer.createRenderer(doc.body, typeData);
    

    doc is undefined in AOT

  3. sis0k0 commented on Mar 21, 2018

    @sis0k0
    Contributor

    Hey @jolafrite, can you test with the next version of {N} angular?

    npm install nativescript-angular@next
    

    This should be fixed with #1164, but it hasn't been released yet.

  4. jolafrite commented on Mar 21, 2018

    @jolafrite
    Author

    @sis0k0 just when I found what I was supposed to do to fix the issue :-)
    yes move the document polyfill to platform-common.ts fixes the issue
    Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions