Skip to content
This repository was archived by the owner on Aug 24, 2020. It is now read-only.

Commit 5359ea8

Browse files
authored
Update swing-card.component.ts
Forgot why did I do this, but it helps.
1 parent da6a32b commit 5359ea8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/app/modules/ionic-swing/components/swing-card.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ import {Card} from '../interfaces/swing';
1010
`
1111
})
1212
export class SwingCardComponent implements OnInit {
13+
private card:Card;
1314
constructor(
1415
private elmentRef: ElementRef,
1516
private swingStack: SwingStackComponent) {
1617
}
1718

1819
ngOnInit() {
19-
this.swingStack.addCard(this);
20+
this.card = this.swingStack.addCard(this);
2021
}
2122

2223
getElementRef() {
@@ -28,6 +29,6 @@ export class SwingCardComponent implements OnInit {
2829
}
2930

3031
getCard(): Card {
31-
return this.swingStack.stack.getCard(this.getNativeElement());
32+
return this.card;
3233
}
3334
}

0 commit comments

Comments
 (0)