orbyt
May 31, 2015, 12:39am
1
is iron routers data: ->
option basically a replacement for the usual Template helper? I noticed
Template.mainview.helpers hello: () -> text = 'hello' return text
and then adding {{hello}}
didnt work with iron router, but then using
data: -> hello: 'hello'
in the route did work. Is this data option used like a regular template helper?
No, the data
function should return the data context the template should be rendered with, and you can still use ordinary helpers (why it doesn’t work in your case I can’t say without seeing more code).
# Iron.Router
A router that works on the server and the browser, designed specifically for
[Meteor](https://github.com/meteor/meteor).
## Quick Start
You can install iron:router using Meteor's package management system:
```bash
> meteor add iron:router
```
To update iron:router to the latest version you can use the `meteor update`
command:
```bash
> meteor update iron:router
```
This file has been truncated. show original
1 Like
orbyt
May 31, 2015, 4:45pm
3
Edit: fixed, guess it was a spacing issue as c+p the helpers back in fixed it.