-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to use this directive in an ion-slides? #21
Comments
Can you post a minimal example (template) where I can reproduce the issue? I've tried quickly but slides don't seem to be meant to be scrollable (vertically). I need to see how you're using them. |
I´ve update the example |
Thx for the update, but the scrolling still does not happen for me. Could you also post your scss file? I guess you modify in there the overflow style somehow. |
Sorry about that :( I´ve update again. |
Can you reproduce the example ? |
Sorry, didn't get a chance yet. I'll try once I have better connection. |
Yes, I can reproduce it. Will have a look, but I'm not sure if there's a 'clean' fix for this. Will post back. |
@jorgemejia Can you please try the following and tell me if this will work for you? Instead of modifying the slides CSS I tried the approach using an <ion-header>
<ion-navbar>
<ion-title>
Sticky w/ ion-slides
</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding scrollY="false">
<ion-slides>
<ion-slide *ngFor="let day of days">
<ion-scroll scrollY="true" style="height:80vh" #content>
<ion-card>
<ion-item ion-affix [content]="content" no-lines>
<h3>{{day}}</h3>
</ion-item>
<ion-card-content>
<div *ngFor="let item of items" class="card-body" style="height: 80px">
{{item}}
</div>
</ion-card-content>
</ion-card>
</ion-scroll>
</ion-slide>
</ion-slides>
</ion-content> This is my component: import { Component } from '@angular/core';
import { IonicPage } from 'ionic-angular';
@IonicPage({
name: 'slides',
priority: 'high'
})
@Component({
templateUrl: 'slides.html'
})
export class SlidesPage {
days = ['SUNDAY', 'MONDAY', 'TUESDAY'];
items = Array.from({length: 15}, (value, key) => key);
} The only CSS change I added was .swiper-slide {
display: block;
} Do you think this approach is working for you? |
This works fine in the web browser, but in iOS sometimes disappear the entire slide, the header sticky transition is slow and when I scroll down appears the header twice (one small and the sticky) |
Argh, ok. I will have another look when I have time. If you have a fix PRs are always welcome :). |
Thanks alot for your time, if I have a better way to do it i will post it. |
Hi i´m trying to use this directive in an ion-slides this is the code i´m using.
What i´m trying to do is to sticky the header in this case is the day.
This is how I nitialize the slider.
The text was updated successfully, but these errors were encountered: