How to include 3rd party module (angular-pull-to-refresh), which has no type definitions

roz*_*man 2 module angularjs pull-to-refresh

I'm a complete beginner and I don't have any idea, how include libraries and inject module, so please, bear with me. This is the module I want to include: https://github.com/mgcrea/angular-pull-to-refresh

我用凉亭安装了模块并成功链接了它们。应该在 app.component.html 中,对吗?或者我应该将它链接到名为 list ( list.component.html) 的组件中,在那里我显示数据,我想用下拉刷新?

你能指出我正确的方向吗,把这条线放在哪里以及“myApp”在这里代表什么。
- 将mgcrea.pullToRefresh模块注入您的应用程序:
angular.module('myApp', ['mgcrea.pullToRefresh']);

在示例中,pull-to-refresh属性被调用并在函数 onReload() 内。这个函数应该放在什么地方?

感谢大家阅读和帮助我!

roz*_*man 5

我设法使用此插件进行工作拉刷新:https : //github.com/BoxFactura/pulltorefresh.js 这是如何:
安装插件和插件的@types
npm install pulltorefreshjs --save npm install @types/pulltorefreshjs --save

然后在 app.components.ts 中导入
import * as PullToRefresh from 'pulltorefreshjs';

并在 app.components.ts 中初始化它:
ptrinit:any = PullToRefresh.init();