mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-08 23:58:13 +08:00
docs(): usage and examples
This commit is contained in:
@ -4,10 +4,8 @@ The Slides component is a multi-section container. Each section can be swiped
|
||||
or dragged between. It contains any number of [Slide](../Slide) components.
|
||||
|
||||
|
||||
```
|
||||
Adopted from Swiper.js:
|
||||
The most modern mobile touch slider and framework with
|
||||
hardware accelerated transitions.
|
||||
The most modern mobile touch slider and framework with hardware accelerated transitions.
|
||||
|
||||
http://www.idangero.us/swiper/
|
||||
|
||||
@ -16,7 +14,6 @@ The iDangero.us
|
||||
http://www.idangero.us/
|
||||
|
||||
Licensed under MIT
|
||||
```
|
||||
|
||||
|
||||
<!-- Auto Generated Below -->
|
||||
|
||||
@ -1,12 +1,4 @@
|
||||
import {
|
||||
Component,
|
||||
Element,
|
||||
Event,
|
||||
EventEmitter,
|
||||
Method,
|
||||
Prop,
|
||||
Watch
|
||||
} from '@stencil/core';
|
||||
import { Component, Element, Event, EventEmitter, Method, Prop, Watch } from '@stencil/core';
|
||||
import { Swiper } from './vendor/swiper.js';
|
||||
@Component({
|
||||
tag: 'ion-slides',
|
||||
|
||||
26
core/src/components/slides/usage/angular.md
Normal file
26
core/src/components/slides/usage/angular.md
Normal file
@ -0,0 +1,26 @@
|
||||
```typescript
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'slides-example',
|
||||
template: `
|
||||
<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>
|
||||
`
|
||||
})
|
||||
export class SlideExample {
|
||||
slideOpts = {
|
||||
effect: 'flip'
|
||||
};
|
||||
constructor() {}
|
||||
}
|
||||
```
|
||||
23
core/src/components/slides/usage/javascript.md
Normal file
23
core/src/components/slides/usage/javascript.md
Normal file
@ -0,0 +1,23 @@
|
||||
```html
|
||||
<ion-slides pager="true">
|
||||
|
||||
<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>
|
||||
```
|
||||
|
||||
```javascript
|
||||
var slides = document.querySelector('ion-slides');
|
||||
slides.options = {
|
||||
effect: 'flip'
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user