From f8b33cb67ef8136f54e85b134234eff72dea4309 Mon Sep 17 00:00:00 2001 From: Billy Brawner Date: Wed, 29 Aug 2018 21:29:45 -0500 Subject: [PATCH] Fix compilation errors --- src/app/dashboard/dashboard.component.ts | 3 ++- src/app/transaction.service.ts | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/dashboard/dashboard.component.ts b/src/app/dashboard/dashboard.component.ts index 4264d0e..30519a2 100644 --- a/src/app/dashboard/dashboard.component.ts +++ b/src/app/dashboard/dashboard.component.ts @@ -1,4 +1,5 @@ import { Component, OnInit } from '@angular/core'; +import { Transaction } from '../transaction' import { TransactionService } from '../transaction.service' @Component({ @@ -25,6 +26,6 @@ export class DashboardComponent implements OnInit { } getTransactions(): void { - this.transactionService.getTransactions().subscribe(transactions => this.balance = balance) + this.transactionService.getTransactions().subscribe(transactions => this.transactions = transactions) } } diff --git a/src/app/transaction.service.ts b/src/app/transaction.service.ts index 71108d7..bb4136a 100644 --- a/src/app/transaction.service.ts +++ b/src/app/transaction.service.ts @@ -15,7 +15,7 @@ export class TransactionService { this.db = new BudgetDatabase(); } - getTransactions(count: number?): Observable { + getTransactions(count?: number): Observable { if (count) { return from(this.db.transactions.toCollection().limit(count).toArray()) } else { @@ -41,7 +41,7 @@ export class TransactionService { return from(this.db.transactions.delete(transaction.id)) } - getBalance(): Observable { console.log("Getting balance") let sum = 0; return from(