MAID: changed event name to be more descriptive

This commit is contained in:
jason.wall 2016-12-02 11:01:44 -05:00
parent b417124dd9
commit 75cd2ac4b3
3 changed files with 5 additions and 5 deletions

View File

@ -5,7 +5,7 @@ import { Component, EventEmitter, Output, Input} from "@angular/core";
}) })
export class Passage { export class Passage {
@Output() @Output()
onStrongs = new EventEmitter<string>(); onStrongsClicked = new EventEmitter<string>();
@Output() @Output()
onClose = new EventEmitter<CardItem>(); onClose = new EventEmitter<CardItem>();
@ -25,7 +25,7 @@ export class Passage {
this.onClose.emit(this.cardItem); this.onClose.emit(this.cardItem);
} }
openStrongs(strongs: string) { openStrongs(strongs: string) {
this.onStrongs.emit(this.dict+strongs); this.onStrongsClicked.emit(this.dict+strongs);
} }
isPunct(c: string) { isPunct(c: string) {

View File

@ -8,7 +8,7 @@
</ion-header> </ion-header>
<ion-content padding class="search-card"> <ion-content padding class="search-card">
<ion-card *ngFor="let item of items"> <ion-card *ngFor="let item of items">
<passage *ngIf="isPassage(item.type)" [cardItem]="item" [item]="item.data" [dict]="item.dict" (onStrongs)="getItems($event)" (onClose)="removeItem($event)"></passage> <passage *ngIf="isPassage(item.type)" [cardItem]="item" [item]="item.data" (onClose)="removeItem($event)" [dict]="item.dict" (onStrongsClicked)="getItems($event)"></passage>
<strongs *ngIf="isStrongs(item.type)" [cardItem]="item" [item]="item.data" (onClose)="removeItem($event)"></strongs> <strongs *ngIf="isStrongs(item.type)" [cardItem]="item" [item]="item.data" (onClose)="removeItem($event)"></strongs>
<button ion-button icon-left clear small (click)="removeItem(item)"> <button ion-button icon-left clear small (click)="removeItem(item)">
<ion-icon name="close-circle"></ion-icon> <ion-icon name="close-circle"></ion-icon>

View File

@ -67,11 +67,11 @@ export class SearchPage {
} }
isPassage(t: Type<any>) { isPassage(t: Type<any>) {
return t == Passage; return t === Passage;
} }
isStrongs(t: Type<any>) { isStrongs(t: Type<any>) {
return t == Strongs; return t === Strongs;
} }
getItems(search) { getItems(search) {