Comments (3)
You just need to call the refresh event:
<PullToRefresh (refresh)="refreshList($event)">
<ListView [items]="groceryList" row="2" class="small-spacing" [class.visible]="listLoaded">
<template let-item="item">
<Label [text]="item.name" class="medium-spacing"></Label>
</template>
</ListView>
</PullToRefresh>
class YourComponent {
refreshList(args) {
console.log('do refresh');
}
}
from nativescript-pulltorefresh.
There is a refresh event on the component. I'm not sure about ng2 as I
don't use it yet but it does work as I've seen people using it on the slack
channel. So I'm guessing just add the refresh event, look at the sample on
the README
On Thu, Jul 7, 2016, 8:23 AM Yunus Emre Uluçay [email protected]
wrote:
I want to add your component to my {N} Angular app.
and added this in my component ts file.
import { registerElement, ViewClass } from "nativescript-angular/element-registry";
registerElement("PullToRefresh", () => {
var viewClass = require("nativescript-pulltorefresh").PullToRefresh;
return viewClass;
});in the view page used it like that
It works and refresh spinner is shown on the top of the list when you pull
down. But it should somehow trigger a method. lets suppose method name isrefreshList(){}
how will I use it from the view?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/bradmartin/nativescript-pulltorefresh/issues/11, or mute
the thread
https://github.com/notifications/unsubscribe/AFulhDVGXHezDaKYirg4YazFpK3uxyX_ks5qTP3pgaJpZM4JHEp_
.
from nativescript-pulltorefresh.
Closing @yeulucay - if you need help using this see above comment.
from nativescript-pulltorefresh.
Related Issues (20)
- Indicator Color HOT 2
- Conditionnnal blocked plugin
- color and backgroundColor property applies to content element GridLayout HOT 1
- Fails to build on Android for Nativescript 6.0.0 HOT 1
- app:runsbg after updating to nativescript 6 HOT 1
- Not working with webview on android, for ios works fine HOT 5
- iOS bounce up on refresh and no animation HOT 10
- Class not found android.support.v4.widget.SwipeRefreshLayout.OnRefreshListener HOT 3
- Android ViewPager2 increased sensitivity HOT 2
- Not working on iOS onLoaded or programmatically HOT 2
- Changelog for 2.0.0 ?
- Wrong version being downloaded by default HOT 2
- exception with version 3 HOT 8
- Cannot read property 'SwipeRefreshLayout' of undefined HOT 2
- How to prevent pull to refresh when dragging down on Google Maps? HOT 1
- Cannot access 'PullToRefresh' before initialization HOT 3
- FR: add api to show refreshing-indicator by script
- NativeScript 7 Support HOT 2
- tns plugin add @nstudio/[email protected] HOT 1
- Move to community HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nativescript-pulltorefresh.