Skip to content

Commit

Permalink
Step 6.1: Create PartiesList component
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilkisiela authored and DAB0mB committed Dec 14, 2016
1 parent 00a25f0 commit 82781e7
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions client/imports/app/parties/parties-list.component.ts
@@ -0,0 +1,23 @@
import { Component } from '@angular/core';
import { Observable } from 'rxjs/Observable';

import { Parties } from '../../../../both/collections/parties.collection';
import { Party } from '../../../../both/models/party.model';

import template from './parties-list.component.html';

@Component({
selector: 'parties-list',
template
})
export class PartiesListComponent {
parties: Observable<Party[]>;

constructor() {
this.parties = Parties.find({}).zone();
}

removeParty(party: Party): void {
Parties.remove(party._id);
}
}

0 comments on commit 82781e7

Please sign in to comment.