项目作者: thatisuday

项目描述 :
Show e-commerce product images zoom slideshow in modal for Angular 4+
高级语言: CSS
项目地址: git://github.com/thatisuday/ngx-product-zoom.git
创建时间: 2017-09-14T18:19:42Z
项目社区:https://github.com/thatisuday/ngx-product-zoom

开源协议:

下载


ecom-product-zoom-modal

Show e-commerce product images zoom slideshow in modal for Angular 4+

preview

@plency/ecom-product-zoom-modal"">npm
@plency/ecom-product-zoom-modal"">npm
@plency/ecom-product-zoom-modal"">David

Install

  1. npm install @plency/ecom-product-zoom-modal

Import Module

  1. import { EcomProductZoomModalModule } from '@plency/ecom-product-zoom-modal';
  2. @NgModule({
  3. ...,
  4. imports: [
  5. ...,
  6. EcomProductZoomModalModule
  7. ]
  8. })

Use

  1. import { Component, OnInit } from '@angular/core';
  2. import { EcomProductZoomModalImage, EcomProductZoomModalService } from '@plency/ecom-product-zoom-modal';
  3. @Component({
  4. selector: 'app-root',
  5. templateUrl: './app.component.html',
  6. styleUrls: ['./app.component.scss']
  7. })
  8. export class AppComponent {
  9. images: EcomProductZoomModalImage[] = [{
  10. img: 'large-1.jpg',
  11. thumb: 'small-1.jpg'
  12. }, {
  13. img: 'large-2.jpg',
  14. thumb: 'small-2.jpg'
  15. }, {
  16. img: 'large-3.jpg',
  17. thumb: 'small-3.jpg'
  18. }];
  19. constructor(
  20. private prodZoomModalService: EcomProductZoomModalService
  21. ) { }
  22. ngOnInit() {
  23. }
  24. openModal() {
  25. this.prodZoomModalService.open(this.images);
  26. }
  27. }