Permalink
Browse files

Step 4.9: Add Party type to data fixtures

  • Loading branch information...
1 parent 7bcae9a commit 44405f4d22149917dc1dc019a206986409f1d9c5 @kamilkisiela kamilkisiela committed with DAB0mB Sep 21, 2016
Showing with 5 additions and 3 deletions.
  1. +2 −1 client/imports/app/app.component.ts
  2. +3 −2 server/imports/fixtures/parties.ts
@@ -2,6 +2,7 @@ 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 './app.component.html';
@@ -10,7 +11,7 @@ import template from './app.component.html';
template
})
export class AppComponent {
- parties: Observable<any[]>;
+ parties: Observable<Party[]>;
constructor() {
this.parties = Parties.find({}).zone();
@@ -1,8 +1,9 @@
import { Parties } from '../../../both/collections/parties.collection';
+import { Party } from '../../../both/models/party.model';
export function loadParties() {
if (Parties.find().cursor.count() === 0) {
- const parties = [{
+ const parties: Party[] = [{
name: 'Dubstep-Free Zone',
description: 'Can we please just for an evening not listen to dubstep.',
location: 'Palo Alto'
@@ -16,6 +17,6 @@ export function loadParties() {
location: 'San Francisco'
}];
- parties.forEach((party) => Parties.insert(party));
+ parties.forEach((party: Party) => Parties.insert(party));
}
}

0 comments on commit 44405f4

Please sign in to comment.