Permalink
Browse files

Step 4.3: Bind MongoObservable to Angular

  • Loading branch information...
1 parent 880efd3 commit 8fd20bda0a29af3730b16f27e01065a8e26d72e3 @kamilkisiela kamilkisiela committed with DAB0mB Sep 21, 2016
Showing with 3 additions and 15 deletions.
  1. +3 −15 client/imports/app/app.component.ts
@@ -1,4 +1,5 @@
import { Component } from '@angular/core';
+import { Observable } from 'rxjs/Observable';
import { Parties } from '../../../both/collections/parties.collection';
@@ -9,22 +10,9 @@ import template from './app.component.html';
template
})
export class AppComponent {
- parties: any[];
+ parties: Observable<any[]>;
constructor() {
- this.parties = [
- {'name': 'Dubstep-Free Zone',
- 'description': 'Can we please just for an evening not listen to dubstep.',
- 'location': 'Palo Alto'
- },
- {'name': 'All dubstep all the time',
- 'description': 'Get it on!',
- 'location': 'Palo Alto'
- },
- {'name': 'Savage lounging',
- 'description': 'Leisure suit required. And only fiercest manners.',
- 'location': 'San Francisco'
- }
- ];
+ this.parties = Parties.find({}).zone();
}
}

0 comments on commit 8fd20bd

Please sign in to comment.