2017-01-04 17:17:56 -05:00

35 lines
748 B
TypeScript

import { Component, EventEmitter, Output, Input} from "@angular/core";
@Component({
selector: "passage",
templateUrl: "passage.html"
})
export class Passage {
@Output()
onStrongsClicked = new EventEmitter<OpenData>();
@Output()
onClose = new EventEmitter<CardItem>();
@Input()
item: BiblePassageResult;
@Input()
dict: string;
@Input()
cardItem: CardItem;
constructor() {
}
close() {
this.onClose.emit(this.cardItem);
}
openStrongs(strongs: string) {
this.onStrongsClicked.emit({ card: this.cardItem, qry: this.dict + strongs });
}
openMenu(strongs: string) {
}
isPunct(c: string) {
return new RegExp('^[\.\,\;\:\?\!]$').test(c)
}
}