47 lines
914 B
TypeScript
Raw Normal View History

import { Component, EventEmitter, Output, Input } from "@angular/core";
import { BiblePassageResult } from "../../services/bible-service";
import { OpenData, CardItem } from "../../pages/search/search";
@Component({
selector: "passage",
templateUrl: "passage.html"
})
export class Passage
{
@Output()
onItemClicked = 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.onItemClicked.emit({ card: this.cardItem, qry: this.dict + strongs });
}
openMenu(strongs: string)
{
2017-01-04 17:17:56 -05:00
}
isPunct(c: string)
{
return new RegExp('^[\.\,\;\:\?\!]$').test(c)
}
}