Skip to content

[4.0.0-rc.1] Slides not working in production build #17033

Closed

Description

@abennouna

Bug Report

Ionic version:
[x] 4.0.0-rc.1

Current behavior:

  • In dev mode, no issue.
  • In prod mode, the ion-slides is populated, but is not functional (swiping, pagination...). The following error can be seen in the console:
    Unhandled Promise rejection: c.data is not a function ; Zone: <root> ; Task: Promise.then ; Value: TypeError: c.data is not a function

(Edit: image removed)

Expected behavior:
Slides functional in production build.

Steps to reproduce:

  • Start a new blank rc.1 app
  • Include the demo code from the docs (problem is reproductible with other ion-slides templates)
  • Build for production (ionic build --prod)
  • Start app in browser — tested in:
    • Chrome 71.0.3578.98 (Official Build) (64 bits)
    • Safari 12.0.1 (13606.2.104.1.2)
    • Firefox 64.0.2 (64 bits)

Related code:
home.page.ts

export class HomePage {
  public slideOpts = {
    effect: 'flip',
  };
}

home.page.html

<ion-slides pager="true" [options]="slideOpts">
  <ion-slide>
    <h1>Slide 1</h1>
  </ion-slide>
  <ion-slide>
    <h1>Slide 2</h1>
  </ion-slide>
  <ion-slide>
    <h1>Slide 3</h1>
  </ion-slide>
</ion-slides>

Other information:
Not an issue in rc.0

Ionic info:

Ionic:

   ionic (Ionic CLI)             : 4.7.1 (~.nvm/versions/node/v10.12.0/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.0.0-rc.1
   @angular-devkit/build-angular : 0.11.4
   @angular-devkit/schematics    : 7.1.4
   @angular/cli                  : 7.1.4
   @ionic/angular-toolkit        : 1.2.2

System:

   NodeJS : v10.12.0 (~/.nvm/versions/node/v10.12.0/bin/node)
   npm    : 6.4.1
   OS     : macOS High Sierra

Activity

  1. abennouna commented on Jan 10, 2019

    @abennouna
    ContributorAuthor

    @toriphes was faster (#17032) I think this one can be closed 😁

  2. paulstelzer commented on Jan 10, 2019

    @paulstelzer
    Contributor

    RC.1 isn't working in produciton mode, I can confirm and collect everything under one issue -> #17034

  3. ionitron-bot commented on Feb 9, 2019

    @ionitron-bot

    Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

  4. locked and limited conversation to collaborators on Feb 9, 2019
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

    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