popover-sinonimos.component.ts
728 Bytes
import { Component, OnInit, Input } from '@angular/core';
import { PopoverDirective } from 'ngx-bootstrap';
import { Sinonimo } from 'src/app/wrappers/sinonimo';
@Component({
selector: 'app-popover-sinonimos',
templateUrl: './popover-sinonimos.component.html',
styleUrls: ['./popover-sinonimos.component.scss']
})
export class PopoverSinonimosComponent implements OnInit {
//Directiva del popover, para poder cerrarlo desde este componente
@Input() popover: PopoverDirective;
@Input() popoverContent: Sinonimo[];
sinonimoAelegir: Sinonimo;
constructor() { }
ngOnInit() {
}
hidePopover() {
this.popover.hide();
}
setSinonimo(sinonimo: Sinonimo) {
this.sinonimoAelegir = sinonimo;
}
}