Hello!
I’m trying to do a slider that will contain pages.
Right now the slider looks like this:
<ion-slides>
<ion-slide>
Html content
</ion-slide>
<ion-slides>
I’m trying to make something like this:
<ion-slides>
<ion-slide>
<MyPage>
</ion-slide>
<ion-slides>
MyPage is:
import { Component } from '@angular/core';
@Component({
selector: 'my-page',
templateUrl: 'my-page.html'
})
export class MyPage {
constructor() {}
}
Is there any way to do something like that?
MattE
2
Have you tried it already?
Using a component in an ion-slide shoudn’t be a problem
I havent tried it yet, I don’t know how the syntax should be.
Putting <MyPage>
inside the slide was just an example of what I want to accomplish.
MattE
4
Start with $ ionic g component myComponent
This will generate all the necessary files and links in your project.
After that <myComponent></myComponent>
will work in your ion-slides.
Whoa, I never though it would be that intuitive.
Thanks for your help!
I have another little issue with ion-slides
.
Here is my Stackoverflow.
Sadly no replies, maybe you have an clue…