Skip to content

girassolbit/meteor-maketable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MakeTable

Create your HTML tables from objects in Blaze!

Installation

Install using Meteor's package management system:

> meteor add gbit:maketable

Testing (if you clone the package)

> meteor test-packages ./

How to use

Using the blaze helper

You can use the MakeTable from a helper

Just do it:

	<template name="myTemplate">
		{{ makeTable elements tableClass="my-class" }}
	</template>
Template.myTemplate.helpers({
	elements: function(){
		return {
			"Names": ["John Doe", "Bob Marley"],
			"Emails": ["[email protected]", "[email protected]"]
		};
	}
});

Results:

	<template name="myTemplate">
		<table class="my-class">
			<thead>
				<tr>
					<th>Names</th>
					<th>Emails</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td>John Doe</td>
					<td>[email protected]</td>
				</tr>
				<tr>
					<td>Bob Marley</td>
					<td>[email protected]</td>
				</tr>
			</tbody>
		</table>
	</template>

About

A Blaze helper to creating html tables from objects

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published