JavaScript meteor: Loop for blocks in template

My meteor-template has five times the same elemens. So I think it should be able to make a loop of it:

<table class="article" data-id="{{../article._id}}" data-section="something">
    <thead>
        <tr>
            <th>Something</th>
        </tr>
    </thead>
    <tbody>
        {{#each something}}
            <tr>
                <td><input type="text" value="{{title}}" name="title"></td>
            </tr>
        {{/each}}
    </tbody>
</table>

<table class="article" data-id="{{../article._id}}" data-section="anything">
    <thead>
        <tr>
            <th>Anything</th>
        </tr>
    </thead>
    <tbody>
        {{#each anything}}
            <tr>
                <td><input type="text" value="{{title}}" name="title"></td>
            </tr>
        {{/each}}
    </tbody>
</table>

As you can see the only difference is the data-element (something/anything), the th-element (Something/anything) and the each-element (something/anything). There are totally five tables like this. How do I make a loop of it?

Answer:1

I have an object1 and object2. object1 has an animation with delay: 0s object2 has an animation with delay: 0.5s When you click on 1., both objects properly assign .animation,but object2 after 0.5s,...

I have an object1 and object2. object1 has an animation with delay: 0s object2 has an animation with delay: 0.5s When you click on 1., both objects properly assign .animation,but object2 after 0.5s,...

I have the following function: function messageService($http) { return { get: function (query) { return $http.get("/api/v1/messages", { params: query }); }, delete: function (...

I have the following function: function messageService($http) { return { get: function (query) { return $http.get("/api/v1/messages", { params: query }); }, delete: function (...

  1. javascript name function delete

I can't seem to get this to work, it is probably pretty simple but here we go: This is my selector and I want to look for an element with both the selection[0] and selection[1] class but this does ...

I can't seem to get this to work, it is probably pretty simple but here we go: This is my selector and I want to look for an element with both the selection[0] and selection[1] class but this does ...

  1. target element with two classes
  2. target element with data attribute jquery
  3. target element with attribute css
  4. target element with class
  5. target element with multiple classes css
  6. target element with class css
  7. target element with data attribute
  8. target element with jquery
  9. target element with id css
  10. target element with 2 classes
  11. target element with class jquery
  12. target element with id javascript
  13. target element in html
  14. target element in javascript
  15. target element by class javascript
  16. target element in iframe
  17. target element by name jquery
  18. target element in css
  19. target element by attribute jquery
  20. target element in mammography

I'm using Promise Node.js library and I'd like to do the following: Execute async operation that returns a Promise. When that operation completes, return a Promise that is completed when two paralell ...

I'm using Promise Node.js library and I'd like to do the following: Execute async operation that returns a Promise. When that operation completes, return a Promise that is completed when two paralell ...