mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
docs(): update usage and examples
This commit is contained in:
@ -4,13 +4,6 @@ Content component provides an easy to use content area with some useful methods
|
||||
to control the scrollable area. There should only be one content in a single
|
||||
view component.
|
||||
|
||||
```html
|
||||
<ion-content>
|
||||
Add your content here!
|
||||
</ion-content>
|
||||
|
||||
```
|
||||
|
||||
<!-- Auto Generated Below -->
|
||||
|
||||
|
||||
|
||||
9
core/src/components/content/usage/angular.md
Normal file
9
core/src/components/content/usage/angular.md
Normal file
@ -0,0 +1,9 @@
|
||||
```html
|
||||
<ion-content
|
||||
[scrollEvents]="true"
|
||||
(ionScrollStart)="logScrollStart()"
|
||||
(ionScroll)="logScrolling($event)"
|
||||
(ionScrollEnd)="logScrollEnd()">
|
||||
</ion-content>
|
||||
```
|
||||
|
||||
11
core/src/components/content/usage/javascript.md
Normal file
11
core/src/components/content/usage/javascript.md
Normal file
@ -0,0 +1,11 @@
|
||||
```html
|
||||
<ion-content></ion-content>
|
||||
```
|
||||
|
||||
```javascript
|
||||
var content = document.querySelector('ion-content');
|
||||
content.scrollEvents = true;
|
||||
content.addEventListener('ionScrollStart', () => console.log('scroll start'));
|
||||
content.addEventListener('ionScroll', (ev) => console.log('scroll', ev.detail));
|
||||
content.addEventListener('ionScrollEnd', () => console.log('scroll end'));
|
||||
```
|
||||
Reference in New Issue
Block a user