Skip to content

Instantly share code, notes, and snippets.

@ShilpaLalwani
Created April 15, 2020 05:43
Show Gist options
  • Save ShilpaLalwani/42ee85078fbb4ebb65e9e4f3da223fe8 to your computer and use it in GitHub Desktop.
Save ShilpaLalwani/42ee85078fbb4ebb65e9e4f3da223fe8 to your computer and use it in GitHub Desktop.
import {Component, Input,Output, EventEmitter} from '@angular/core';
@Component({
selector: 'app-card',
templateUrl: 'card.component.html',
styleUrls: ['card.component.scss'],
})
export class CardComponent {
@Input() title: string;
@Input() subTitle: string;
@Input() caption: string;
@Input() avtar: string;
@Input() image: string;
@Output() likeNotify = new EventEmitter<boolean>();
@Output() shareNotify = new EventEmitter<boolean>();
@Output() learnMoreNotify = new EventEmitter<boolean>();
likeEvent() {
this.likeNotify.emit(true);
}
shareEvent() {
this.shareNotify.emit(true);
}
learnMoreEvent() {
this.learnMoreNotify.emit(true);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment