Comments (2)
Two options:
-
the itemTemplate property either accepts a XML template or a function. This function acts as a factory to create new views (more specific: the function's interface should be Template)
-
add an eventt listener to the pager for "itemsLoading". Inside the event handling function set the View to use for the given index (as passed by the event) on the event object.
pager.addEventListener("itemsLoading", (pagerEvent: any) => {
// populate the event passed in with the correct View
pagerEvent.view = viewsCreatedElsewhere[pagerEvent.index];
});
from nativescript-pager.
Added in v7
from nativescript-pager.
Related Issues (20)
- iOS orientation issue using Pager + HtmlView HOT 3
- Vue Template Selector HOT 1
- iOS: item snap does not work while swiping when using tns-ios-v8-beta HOT 6
- iOS Image pager jerked when I swipe left HOT 4
- Changing a property on nested object causes ordering problems HOT 6
- iOS indicator color is not applied HOT 3
- Add vertical and horizontal orientation at the same time HOT 2
- Pager discards global context
- Error angular 9.1.0 HOT 3
- Angular 10 @nativescript-community/ui-pager 13.0.0-alpha.5 module import is not working HOT 2
- @nativescript-community/ui-pager":"^13.0.0-alpha.7 - Error - cant resolve - element-registry, lang-facade HOT 3
- Error: Can't resolve '@nativescript/core/data/observable-array/observable-array' Nativescript 7 HOT 3
- 13.0.0-alpha.10 crash with transformers="scale"
- selectedIndexChange value is undefined.
- Just Programatically Control HOT 1
- Feature Request: Revamping swipeEnd events HOT 1
- Unshift + selectedIndex bugged HOT 8
- 3 Pages in one view HOT 1
- Textview keyboard dismisses after one key tap.
- Build error on NS 8.4
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-pager.