Skip to content
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.

Question: Using in NS angular project #14

Closed
devna13 opened this issue Sep 30, 2016 · 2 comments
Closed

Question: Using in NS angular project #14

devna13 opened this issue Sep 30, 2016 · 2 comments

Comments

@devna13
Copy link

devna13 commented Sep 30, 2016

Tried this layout in NS angular project and it didn't work.

<ScrollView>
<StackLayout>
<PullToRefresh refresh="load()">
... 
</PullToRefresh>
</StackLayout>
</ScrollView>

Is there any declaration in NgModule required to use this plugin ?

Thanks

@bradmartin
Copy link
Collaborator

Possibly, don't use ng2 myself but see here for another component: https://github.com/bradmartin/nativescript-drawingpad#angular

@devna13
Copy link
Author

devna13 commented Sep 30, 2016

Thanks @bradmartin. Tried different codes and this worked.

import {registerElement} from "nativescript-angular/element-registry";
registerElement("PullToRefresh", () => require("nativescript-pulltorefresh").PullToRefresh);
<PullToRefresh (refresh)="load()" #pullToRefresh> 
</PullToRefresh>

@devna13 devna13 closed this as completed Sep 30, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants