https://github.com/tamino-martinius/meteor-handlebars-obj
Easily create plain objects with computed keys as Handlebars helper.
https://github.com/tamino-martinius/meteor-handlebars-obj
Last synced: 2 months ago
JSON representation
Easily create plain objects with computed keys as Handlebars helper.
- Host: GitHub
- URL: https://github.com/tamino-martinius/meteor-handlebars-obj
- Owner: tamino-martinius
- License: mit
- Created: 2014-02-22T15:25:17.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2018-04-11T14:28:09.000Z (about 7 years ago)
- Last Synced: 2025-01-06T03:21:51.517Z (4 months ago)
- Language: CoffeeScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# handlebars-obj
[](https://travis-ci.org/tamino-martinius/meteor-handlebars-obj)
This Version is depricated with meteor 0.8.0 - see [ui-obj](https://github.com/tamino-martinius/meteor-ui-obj) for a 0.8.0 compatible version
Easily create plain objects with computed keys as Handlebars helper.
Useful to set the context of the current scope e.g. for `iron-router` paths.
```hbs
{{#with $obj "one" 1 "two" 2}}
```sets context to
```hbs
{one: 1, two: 2}
```Merge the context within a `each` block with the outer context
```hbs
{{#each items}}
{{#with $obj .. .}}
```