meteor - Dynamic dispalying of data based on fields of a collection -


so, have collection of documents following fields (id, usera, userb, message). (document name room) want name room based on user logged in. ie if user want userb displayed , vice versa. have code below , seems outputting userb time. suggestions appreciated.

<template name="rooms"> <h4>contacts:</h4> <ul> {{#each rooms}}     {{> room}} {{/each}} </ul> 

<template name="room"> <li style="cursor: pointer; {{roomstyle}}">     {{#if userais}}     {{userb}}     {{/if}}      </li> 

});

 template.room.helpers({ userais: function(usera) {     return this.usera==meteor.userid();   } 

});


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -