Created
July 10, 2020 19:23
-
-
Save smaillns/d64b5f2cfbc65b1725ef89125bdc0584 to your computer and use it in GitHub Desktop.
Pretty simple Image gallery in angular
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Component, OnInit} from '@angular/core'; | |
@Component({ | |
selector: 'app-product-gallery', | |
templateUrl: './product-gallery.component.html', | |
styleUrls: ['./product-gallery.component.scss'] | |
}) | |
export class ProductGalleryComponent implements OnInit { | |
productImages = [ {url: 'assets/images/produit1.jpg'}, | |
{url: 'assets/images/produit2.jpg'}, | |
{url: 'assets/images/produit3.jpg'}] | |
selectedImage: string; | |
imageSize = 430; | |
constructor() {} | |
ngOnInit() {} | |
changeimage(image: string){ | |
this.selectedIimage = image; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment