1.0.3 • Published 6 years ago

meepo-swipe v1.0.3

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

swipe for angular

import { SwipeModule } from 'meepo-swipe';
@NgModule({
  imports: [
    SwipeModule.forRoot()
  ]
})
export class AppModule { }
<swipe [items]="items">
    <ng-template swipeItem let-item>
        <div class="swipe-item">{{item.title}}</div>
    </ng-template>
</swipe>
export class AppComponent implements OnInit {
  items: any[] = [];
  constructor(
    public cd: ChangeDetectorRef
  ) { }
  ngOnInit() {
    this.items = [{ title: '1' }, { title: '2' }, { title: '3' }];
    setTimeout(() => {
      this.items.push({ title: '4' });
      this.cd.markForCheck();
    }, 1000);
  }
}