mirror of
https://gitlab.com/walljm/dynamicbible.git
synced 2025-07-25 16:29:49 -04:00
41 lines
951 B
TypeScript
41 lines
951 B
TypeScript
import { EventEmitter, Component, Input, Output } from "@angular/core";
|
|
import { Reference } from '../../libs/Reference';
|
|
import { OpenData, CardItem } from "../../pages/search/search";
|
|
import { StrongsResult } from "../../services/strongs-service";
|
|
|
|
@Component({
|
|
selector: "strongs",
|
|
templateUrl: "strongs.html"
|
|
})
|
|
export class Strongs
|
|
{
|
|
@Output()
|
|
onClose = new EventEmitter<CardItem>();
|
|
|
|
@Output()
|
|
onPassageClicked = new EventEmitter<OpenData>();
|
|
|
|
@Input()
|
|
item: StrongsResult;
|
|
|
|
@Input()
|
|
cardItem: CardItem;
|
|
|
|
constructor()
|
|
{
|
|
}
|
|
|
|
close()
|
|
{
|
|
this.onClose.emit(this.cardItem);
|
|
}
|
|
makePassage(p: string)
|
|
{
|
|
return Reference.bookName(parseInt(p.split(";")[0])) + ' ' + p.split(";")[1] + ":" + p.split(";")[2];
|
|
}
|
|
openPassage(p: string)
|
|
{
|
|
let ref = this.makePassage(p);
|
|
this.onPassageClicked.emit({ card: this.cardItem, qry: ref });
|
|
}
|
|
} |