Comments (7)
from nativescript-pulltorefresh.
Tried that as well... failed :'-(
from nativescript-pulltorefresh.
from nativescript-pulltorefresh.
home.component.html
<PullToRefresh #pullToRefreshElement (refresh)="onPullRefresh($event)">
...
</PullToRefresh>
home.component.ts
import { Component, AfterViewInit, ElementRef, ViewChild } from "@angular/core";
@ViewChild("pullToRefreshElement") pullToRefreshElement: ElementRef;
ngAfterViewInit(){
console.log('pullToRefresh element', this.pullToRefreshElement)
console.log('pullToRefresh nativeElement', this.pullToRefreshElement.nativeElement)
console.log('pullToRefresh nativeElement nativeView', this.pullToRefreshElement.nativeElement.nativeView)
console.log('pullToRefresh nativeElement android', this.pullToRefreshElement.nativeElement.android)
// doesn't work anyway
// console.log('pullToRefresh', this.pullToRefreshElement.nativeView);
// console.log('pullToRefresh', this.pullToRefreshElement.android);
// console.log('pullToRefresh', this.pullToRefreshElement.nativeElement.nativeView);
}
The console output
JS: pullToRefresh element [object Object]
JS: pullToRefresh nativeElement PullToRefresh(477)
JS: pullToRefresh nativeElement nativeView
JS: pullToRefresh nativeElement android
from nativescript-pulltorefresh.
Huh, I left all this debug info in... and now I keep receiving what I was expecting...
pullToRefresh nativeElement nativeView android.support.v4.widget.SwipeRefreshLayout{223e69b V.ED..... ......I. 0,0-0,0 #19}
Oh well... 😕
from nativescript-pulltorefresh.
So you got it figured out? If you're still having issues, the forums or the NS slack community are best to figure this out. I don't think there is an issue with the plugin specifically so let's keep the repo issues clean 👍 hopefully you're good to go now.
from nativescript-pulltorefresh.
Yes, it was one of those cases when the element does not actually exist on the page even after AfterViewInit. setTimeout
fixed it 👍
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.