From 6ae8b0d4fe18ae79329cdd3f56417e2d67c7aed0 Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Thu, 7 Apr 2016 09:56:46 +0200 Subject: [PATCH] Step 3.2: Add the parties collection helper --- client/main.js | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/client/main.js b/client/main.js index feb14f89b..e16ab3b77 100644 --- a/client/main.js +++ b/client/main.js @@ -1,20 +1,16 @@ import angular from 'angular'; import angularMeteor from 'angular-meteor'; +import { Parties } from '../collections/parties'; angular.module('socially', [ angularMeteor ]) .controller('PartiesListCtrl', function($scope) { 'ngInject'; - - $scope.parties = [{ - 'name': 'Dubstep-Free Zone', - 'description': 'Can we please just for an evening not listen to dubstep.' - }, { - 'name': 'All dubstep all the time', - 'description': 'Get it on!' - }, { - 'name': 'Savage lounging', - 'description': 'Leisure suit required. And only fiercest manners.' - }]; + + $scope.helpers({ + parties() { + return Parties.find({}); + } + }); });