{"id":20045600,"url":"https://github.com/jun1362008/ion2-image-slide","last_synced_at":"2025-05-05T09:30:57.537Z","repository":{"id":57275880,"uuid":"101266375","full_name":"jun1362008/ion2-image-slide","owner":"jun1362008","description":"ionic image slide zoom","archived":false,"fork":false,"pushed_at":"2017-08-24T09:38:23.000Z","size":6753,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-08T17:30:47.742Z","etag":null,"topics":["image","ionic","ionic2","slide","slides","zoom"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jun1362008.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-24T07:24:11.000Z","updated_at":"2019-01-16T09:11:43.000Z","dependencies_parsed_at":"2022-08-25T01:14:14.725Z","dependency_job_id":null,"html_url":"https://github.com/jun1362008/ion2-image-slide","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jun1362008%2Fion2-image-slide","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jun1362008%2Fion2-image-slide/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jun1362008%2Fion2-image-slide/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jun1362008%2Fion2-image-slide/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jun1362008","download_url":"https://codeload.github.com/jun1362008/ion2-image-slide/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224435946,"owners_count":17310753,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["image","ionic","ionic2","slide","slides","zoom"],"created_at":"2024-11-13T11:18:08.462Z","updated_at":"2024-11-13T11:18:09.235Z","avatar_url":"https://github.com/jun1362008.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ionic Slide Zoom\n\n[![](https://img.shields.io/badge/ionic-3.6.0-blue.svg?ionic=3.6.0)](https://github.com/jun1362008/ion2-image-slide)\n[![](https://img.shields.io/npm/v/@cycle/core.svg)](https://www.npmjs.com/package/ion2-image-slide)\n\nIonic slide with zoom modal\n\n![](./image-slide.gif)\n\n### How To Use:\n\n```bash\n$ npm install ion2-image-slide --save\n```\n\nThen cd into `app.ts`:\n\n```bash\nimport { SlideModule, SlideCmp } from 'ion2-image-slide';\n```\n\n```\n@NgModule({\n  imports: [\n    xxx,\n    SlideModule\n  ],\n  entrycomponents: [\n    xxx,\n    SlideCmp\n  ]\n})\n```\n\nCd into your page:\n```\n  @ViewChild(Slides) slides: Slides;\n\n  imgSlides: Array\u003cany\u003e = [\n    {\n      url: 'xxx.jpg'\n    },\n    {\n      url: 'xxx.jpg'\n    },\n    {\n      url: 'xxx.jpg'\n    },\n    {\n      url: 'xxx.jpg'\n    }\n  ];\n\n  constructor(private slideCtrl: SlideController){}\n\n  slideUp(ev: any) {\n    let currentIndex = this.slides._activeIndex;\n    let slide = this.slideCtrl.create({\n      ev: ev,\n      list: this.imgSlides,\n      index: currentIndex,\n      change: this.changeCB.bind(this)\n    });\n    slide.present({\n      ev: {\n        data: ev,\n        list: this.imgSlides,\n        index: currentIndex,\n        change: this.changeCB.bind(this)\n      }\n    });\n  }\n\n  changeCB(data: any) {\n    this.slides.slideTo(data, 0);\n  }\n```\n\nAnd the html template:\n```\n\u003cdiv\u003e\n  \u003cion-slides\u003e\n    \u003cion-slide *ngFor=\"let slide of imgSlides\"\u003e\n      \u003cimg [src]=\"slide.url\" (click)=\"slideUp($event)\"\u003e\n    \u003c/ion-slide\u003e\n  \u003c/ion-slides\u003e\n\u003c/div\u003e\n```\n\nSubstitute ios for android if not on a Mac.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjun1362008%2Fion2-image-slide","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjun1362008%2Fion2-image-slide","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjun1362008%2Fion2-image-slide/lists"}