A NativeScript plugin to provide the Pull to Refresh control on any view.

@nativescript-community/ui-pulltorefresh

Downloads per month NPM Version

A NativeScript plugin to provide the Pull to Refresh control on any view.


iOS Demo Android Demo

Run the following command from the root of your project:

ns plugin add @nativescript-community/ui-pulltorefresh


    
        
    

import { LottieView } from "@nativescript-community/ui-lottie";

public yourLoadedEvent(args) {
this._myLottie = args.object as LottieView; /// this is the instance of the LottieAnimationView
}

First you need to include the NativeScriptLottieModule in your app.module.ts

import { NativeScriptLottieModule} from '@nativescript-community/ui-lottie/angular';

@NgModule({
imports: [
NativeScriptLottieModule
],
...
})

         

import { Component } from '@angular/core';
import { LottieView } from '@nativescript-community/ui-lottie';

@Component({
templateUrl: 'home.component.html',
moduleId: module.id
})
export class HomeComponent {
public loop: boolean = true;
public src: string;
public autoPlay: boolean = true;
public animations: Array<string>;

private _lottieView: LottieView;

constructor() {
this.animations = [
'Mobilo/A.json',
'Mobilo/D.json',
'Mobilo/N.json',
'Mobilo/S.json'
];
this.src = this.animations[0];
}

lottieViewLoaded(event) {
this._lottieView = <LottieView>event.object;
}
}

If you want to use this plugin with Vue, do this in your app.js or main.js:

import LottieView from '@nativescript-community/ui-lottie/vue';

Vue.use(LottieView);

This will install and register LottieView component to your Vue instance and now you can use the plugin.