Note that there are some explanatory texts on larger screens.

plurals
  1. POShow only 50 characters in meteorjs and bootstrap 3
    primarykey
    data
    text
    <p>I am using Meteorjs and bootstrap 3 for my application. I am quite new to both of these. What I am doing is I am fetching some objects from database and rendering them in a Table . but the problem is if the object text is long it increases the table Row size which affect all the template structure. I can do this by hiding the overflow but that is not a right way to do this. I am doing it like this </p> <pre><code>{{#each questions}} &lt;tr&gt; &lt;td&gt; &lt;a href="#" data-id="{{_id}}" class="edit"&gt; {{question_text}}&lt;/a&gt; &lt;/td&gt; &lt;/tr&gt; {{/each}} Template.questions.questions = function () { questions= Meteor.questions.find({topic_id: Session.get("currentTopicId")}); return questions } </code></pre> <p>I want to show only first 50 characters of the question in the TD cell following by a few dots. How can I do this In meteorjs. Do i need to split the text before rendering that ? or Tell me how can I split the question_text in template or is there any inbuilt method which shows only first 50 characters of the text. </p> <p><h3>My next query is when I print or do console.log(questions) it shows me many fields like collections, queries, and some other things where queries, results, docs each containes the object questions. How can I get these questions objects from the response object. means i want to iterate a loop over these questions objects. How can i do that.</h3> In simple i want to iterate the loop over the retrieved objects.</p> <h2> Can someone Post a complete Example using handlebarsjs.js</h2>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload