File

src/app/components/favourite-status/favourite-status.component.ts

Metadata

selector app-favourite-status
styleUrls favourite-status.component.scss
templateUrl favourite-status.component.html

Inputs

place

Type: Place

Outputs

toggleFavouriteStatus $event type: EventEmitter<Place>

Constructor

constructor()

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();
  }

}

results matching ""

    No results matching ""