-1
I’m developing an app using Ionic 4.
On one of the pages I started creating, I’m trying to use the "ion-slides component".
I inserted a basic component into an html page, just to test, like this:
<ion-slides>
<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>
I have not made any changes to the typescript file on this page, as you can see below:
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-novo-teste',
templateUrl: './novo-teste.page.html',
styleUrls: ['./novo-teste.page.scss'],
})
export class NovoTestePage implements OnInit {
constructor() { }
ngOnInit() {
}
}
The problem is that the screen gets all black and the "ion-slide" occupies only the top part of the screen, as it appears in the image below:
I am using Google Chrome, and no error appeared in the browser console.
How do I fix it?
From now on, thank you!
It’s probably some Css somewhere that’s causing this.
– LeAndrade
In Ionic 3 it was necessary import the slide component, probably in Ionic 4 is also necessary(I found that example of use, maybe it helps you)
– Péttrin Miranda