Skip to content

Commit

Permalink
Step 3.9: Move PartiesList to imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamil Kisiela authored and Dotan Simha committed Nov 22, 2016
1 parent 595bc9d commit af8a289
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions imports/ui/components/partiesList/partiesList.js
@@ -0,0 +1,27 @@
import angular from 'angular';
import angularMeteor from 'angular-meteor';

class PartiesList {
constructor($scope, $reactive) {
'ngInject';

$reactive(this).attach($scope);

this.helpers({
parties() {
return Parties.find({});
}
});
}
}

const name = 'partiesList';

// create a module
export default angular.module(name, [
angularMeteor
]).component(name, {
templateUrl: `imports/ui/components/${name}/${name}.html`,
controllerAs: name,
controller: PartiesList
});

0 comments on commit af8a289

Please sign in to comment.