ngx-drag-scroll轻量级Angular轮播库的使用指南

ngx-drag-scroll 是一个轻量级的响应式Angular轮播库,实现拖动滚动功能。要开始使用,请先在npm上安装:

npm install ngx-drag-scroll --save

此项目要求Angular 5+。接下来,将 DragScrollModule 导入到您的应用程序模块:

import { DragScrollModule } from 'ngx-drag-scroll';

@NgModule({
  declarations: [AppComponent],
  imports: [DragScrollModule, ...],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule {}

然后,在可滚动元素中添加 drag-scroll 属性:


  <!-- 轮播内容 -->

zip
ngx-drag-scroll-master.zip 预估大小:87个文件
folder
ngx-drag-scroll-master 文件夹
folder
.github 文件夹
file
ISSUE_TEMPLATE.md 983B
file
PULL_REQUEST_TEMPLATE 709B
file
commitlint.config.js 72B
file
RELEASE.md 634B
folder
src 文件夹
file
tsconfig.spec.json 256B
file
main.ts 391B
file
index.html 343B
file
polyfills.ts 3KB
folder
environments 文件夹
file
environment.ts 662B
file
environment.prod.ts 51B
file
favicon.ico 5KB
file
styles.scss 165B
folder
assets 文件夹
folder
img 文件夹
file
r2d2.png 178KB
file
leia.png 221KB
file
sw_art3.jpg 255KB
file
Wp03zyitgY.gif 1.43MB
file
varder.png 175KB
file
yoda.png 138KB
file
luke.png 158KB
file
chubaka.png 108KB
file
sw_art1.jpg 319KB
file
angular-white-transparent.svg 1021B
file
yolo.png 125KB
file
obi.png 183KB
file
c3po.png 118KB
file
github.png 2KB
file
boba.png 121KB
file
sw_art2.jpg 884KB
file
storm.png 168KB
file
star-wars-big.jpg 726KB
folder
.gitkeep 文件夹
file
tslint.json 244B
file
test.ts 642B
file
tsconfig.app.json 222B
folder
app 文件夹
file
app.component.scss 106B
file
app-routing.module.ts 575B
folder
not-found 文件夹
file
not-found.component.html 28B
file
not-found.component.ts 280B
folder
not-found.component.css 文件夹
file
app.module.ts 2KB
file
app.component.html 115B
folder
home 文件夹
file
home.component.css 2KB
file
home.component.html 8KB
file
home.component.ts 2KB
file
app.component.ts 191B
file
app.component.spec.ts 2KB
folder
github 文件夹
file
github.component.scss 286B
file
github.component.html 175B
file
github.component.ts 270B
folder
footer 文件夹
file
footer.component.ts 271B
file
footer.component.scss 397B
file
footer.component.html 651B
folder
header 文件夹
file
header.component.ts 269B
file
header.component.html 252B
file
header.component.css 387B
file
karma.conf.js 1KB
file
angular.json 5KB
file
CONTRIBUTING.md 360B
file
.travis.yml 210B
file
tsconfig.json 628B
file
LICENSE 1KB
file
tslint.json 3KB
file
README.md 6KB
file
copy-artifacts.js 643B
file
browserslist 384B
file
.editorconfig 246B
file
.gitignore 687B
file
CHANGELOG.md 5KB
folder
e2e 文件夹
file
tsconfig.e2e.json 213B
folder
src 文件夹
file
app.e2e-spec.ts 633B
file
app.po.ts 248B
folder
projects 文件夹
folder
ngx-drag-scroll 文件夹
file
tsconfig.spec.json 246B
file
tsconfig.lib.prod.json 96B
folder
src 文件夹
folder
lib 文件夹
file
ngx-drag-scroll.module.ts 372B
file
ngx-drag-scroll-item.ts 543B
file
ngx-drag-scroll.component.spec.ts 31KB
folder
interface 文件夹
file
drag-scroll-element.ts 134B
file
drag-scroll-option.ts 172B
file
ngx-drag-scroll.component.ts 24KB
file
test.ts 700B
file
public-api.ts 293B
file
tsconfig.lib.json 704B
file
tslint.json 222B
file
ng-package.json 164B
file
karma.conf.js 1015B
file
package.json 783B
file
package.json 2KB
...
zip 文件大小:5.21MB