Meteor JS : How to take data of an object in specific ?

For do this, you can use in html file :

{{#with object}}

In your javascript file you need create some helper to take the object :

    'object': function () {
        return Collection.findOne({});

Full Example :


<template name="EventDetail">
    {{#with event}}
    <div class="category page-container container">
        <div class="panel panel-default" style="text-align: left">
            <div class="panel-heading">
                <h3 class="panel-title">{{}}</h3>
            <div class="panel-body">

                <div class="register-form">
                    {{#if isShowDescription}}
                        <div class="form-group col-xs-12">
                            <div class="input-group">


    'event': function () {
        return Events.findOne({}); // Here I take my object
    'isShowDescription':function() {
        if ( this.description != undefined &&  this.description.length > 0 ){
            return true;
        } else {
            return false;

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s