Skip to content

Commit

Permalink
Step 14.19: Create component
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 77856b9 commit 5c9b3d8
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions imports/ui/components/partyRsvpUsers/partyRsvpUsers.js
@@ -0,0 +1,29 @@
import angular from 'angular';
import angularMeteor from 'angular-meteor';

import { Meteor } from 'meteor/meteor';

import template from './partyRsvpUsers.html';
import { name as DisplayNameFilter } from '../../filters/displayNameFilter';

class PartyRsvpUsers {
getUserById(userId) {
return Meteor.users.findOne(userId);
}
}

const name = 'partyRsvpUsers';

// create a module
export default angular.module(name, [
angularMeteor,
DisplayNameFilter
]).component(name, {
template,
controllerAs: name,
bindings: {
rsvps: '<',
type: '@'
},
controller: PartyRsvpUsers
});

0 comments on commit 5c9b3d8

Please sign in to comment.