https://github.com/numtel/meteor-template-from-string
Create Meteor template from String
https://github.com/numtel/meteor-template-from-string
Last synced: about 1 year ago
JSON representation
Create Meteor template from String
- Host: GitHub
- URL: https://github.com/numtel/meteor-template-from-string
- Owner: numtel
- License: mit
- Created: 2015-01-19T02:23:40.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-11-12T11:35:59.000Z (over 10 years ago)
- Last Synced: 2025-03-04T07:51:20.380Z (about 1 year ago)
- Language: JavaScript
- Size: 151 KB
- Stars: 7
- Watchers: 4
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# numtel:template-from-string [](https://travis-ci.org/numtel/meteor-template-from-string)
Combined with [multiline ES6 template strings](https://babeljs.io/docs/learn-es6/#template-strings), make Blaze templates in Meteor with the Spacebars HTML code specified inside your Javascript file.
## Installation
```
meteor add numtel:template-from-string
```
## Usage
Example using ES6 template string:
```javascript
Template.hello = Template.fromString(`
Click Me
You've pressed the button {{counter}} times.
`);
```
## Resources
* [On-Demand Template Example](https://github.com/numtel/meteor-component-example) - Use this package to load templates on-demand with `iron:router`.
* [grigio:babel](https://github.com/grigio/meteor-babel/) - Use ES6 in your main application source files
* [Babel](https://babeljs.io/) - Core package powering ES6 -> ES5 transpiling
## License
MIT