Skip to content

No animation when --prod flag enabled #70

@Yqnn

Description

@Yqnn

Hello,

It seems animations are broken when the production mode of angular is enabled.

It's easy to reproduce on a fresh angular project :

ng new my-app
npm install --save sortablejs && npm install --save angular-sortablejs

In app.component.html :

<div [sortablejs]="items" [sortablejsOptions]="{ animation: 150 }">
  <div *ngFor="let item of items" style="background-color:red; margin:10px; padding:10px">{{ item }}</div>
</div>

In app.module.ts :

  imports: [
    BrowserModule,
    SortablejsModule
  ],

In app.component.ts :
items = ["A","B"];

Now if you run the project with ng serve , animations work well, but if you start it with ng serve --prod, they don't.
There is the same behavior with ng build and ng build --prod.

I'm using Angular 5.0.5, with CLI 1.5.4, angular-sortable 2.3.0 .

Thanks in advance for your help.

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