File
Metadata
selector |
app-favourite-status |
styleUrls |
favourite-status.component.scss |
templateUrl |
favourite-status.component.html |
Outputs
toggleFavouriteStatus
|
$event type: EventEmitter<Place>
|
Methods
toggleFavourite
|
toggleFavourite(place: Place)
|
Returns: void
|
import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
import {Place} from "../../Place";
@Component({
selector: 'app-favourite-status',
templateUrl: './favourite-status.component.html',
styleUrls: ['./favourite-status.component.scss'],
})
export class FavouriteStatusComponent implements OnInit {
@Input() place: Place;
@Output() toggleFavouriteStatus: EventEmitter<Place> = new EventEmitter()
constructor() { }
ngOnInit() {}
toggleFavourite(place: Place){
this.toggleFavouriteStatus.emit();
}
}