Permalink
Browse files

Step 6.1: Create PartiesList component

  • Loading branch information...
1 parent 00a25f0 commit 82781e7737bb7a67d308949dd823e120f2d96a93 @kamilkisiela kamilkisiela committed with DAB0mB Sep 21, 2016
Showing with 23 additions and 0 deletions.
  1. +23 −0 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.