
@egjs/ngx-flicking (英语)
角包装 @egjs/闪烁
* 安装
npm install @egjs/ngx-flicking
# Or if you're using yarn
yarn add @egjs/ngx-flicking
# Or if you're using pnpm
pnpm install @egjs/ngx-flicking
QQ 快速启动
模块定义
+import { NgxFlickingModule } from '@egjs/ngx-flicking';
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
+ NgxFlickingModule /* Add in imports */
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { } /* Your app */
然后我们再捆绑 flicking.css文件可以导入到 styles.scss 或定义 angular.json 配置在 options.build.styles 列表 :
// styles.scss
@import '@egjs/flicking/dist/flicking.css';
模板脚本( S)
import { Plugin } from '@egjs/ngx-flicking';
import { Fade, AutoPlay } from '@egjs/flicking-plugins';
@Component({
selector: 'flicking-demo',
template: `
<ngx-flicking
[options]="{ circular: true, duration: 500 }"
[plugins]="plugins"
(needPanel)="onNeedPanel($event)"
>
<div class="panel">
<img src="https://naver.github.io/egjs-flicking/images/bg01.jpg" />
</div>
<div class="panel">
<img src="https://naver.github.io/egjs-flicking/images/bg02.jpg" />
</div>
<div class="panel">
<img src="https://naver.github.io/egjs-flicking/images/bg03.jpg" />
</div>
</ngx-flicking>
`,
})
export class FlickingDemo implements OnInit {
plugins: Plugin[] = [
new Fade(),
new AutoPlay({
duration: 2000,
direction: 'NEXT',
}),
];
onNeedPanel(e) {
// ADD PANELS
}
}
指南
- [v3.4+] (中文(简体) ) 对 ngx 闪烁应用 Question 选项 (业绩)
• 软件包
您可以像本地的 @ egjs/ flicking 一样使用所有插件 .
检查 @egjs/flicking-plugins (英语) 为了我们提供的现成效果.
+++ 更多选项和实例
捐款
见 捐款额
* 反馈
请存档 问题 带有"Angular"标签.
地方发展
项目设置
npm install
编译和热重装演示
npm run start
编制和修改用于生产
npm run build
运行您的测试
npm run test
林特和修正文件
npm run lint
许可证
egjs-flicking 发布在下面 麻省理工学院许可证。 。 。 .
Copyright (c) 2015-present NAVER Corp.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
