{"action":"created","issue":{"url":"https://api.github.com/repos/timbrandin/sideburns/issues/23","labels_url":"https://api.github.com/repos/timbrandin/sideburns/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/timbrandin/sideburns/issues/23/comments","events_url":"https://api.github.com/repos/timbrandin/sideburns/issues/23/events","html_url":"https://github.com/timbrandin/sideburns/issues/23","id":114738231,"number":23,"title":"what about adding some upgrades to Spacebars meteor developers have been waiting for??","user":{"login":"faceyspacey","id":154732,"avatar_url":"https://avatars.githubusercontent.com/u/154732?v=3","gravatar_id":"","url":"https://api.github.com/users/faceyspacey","html_url":"https://github.com/faceyspacey","followers_url":"https://api.github.com/users/faceyspacey/followers","following_url":"https://api.github.com/users/faceyspacey/following{/other_user}","gists_url":"https://api.github.com/users/faceyspacey/gists{/gist_id}","starred_url":"https://api.github.com/users/faceyspacey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faceyspacey/subscriptions","organizations_url":"https://api.github.com/users/faceyspacey/orgs","repos_url":"https://api.github.com/users/faceyspacey/repos","events_url":"https://api.github.com/users/faceyspacey/events{/privacy}","received_events_url":"https://api.github.com/users/faceyspacey/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-11-03T04:07:46Z","updated_at":"2015-11-10T19:24:00Z","closed_at":null,"body":"for example to do basic math + logic in templates to achieve the canonical example of striping some table rows (based on an index):\r\n\r\n```\r\n<table>\r\n {{#each item in items}}\r\n    <tr class=\"{{@index % 2 ? 'odd' : 'even'}}\"></tr>\r\n {{/each}}\r\n</table>\r\n```\r\n\r\nIt seems it might be easier to achieve this here then in actual spacebars. Might be a good time/place to get these much in-demand features. Of course you first must add `@index` (which arrived in Meteor 1.2) to your to do list. "},"comment":{"url":"https://api.github.com/repos/timbrandin/sideburns/issues/comments/155538573","html_url":"https://github.com/timbrandin/sideburns/issues/23#issuecomment-155538573","issue_url":"https://api.github.com/repos/timbrandin/sideburns/issues/23","id":155538573,"user":{"login":"mitar","id":585279,"avatar_url":"https://avatars.githubusercontent.com/u/585279?v=3","gravatar_id":"","url":"https://api.github.com/users/mitar","html_url":"https://github.com/mitar","followers_url":"https://api.github.com/users/mitar/followers","following_url":"https://api.github.com/users/mitar/following{/other_user}","gists_url":"https://api.github.com/users/mitar/gists{/gist_id}","starred_url":"https://api.github.com/users/mitar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitar/subscriptions","organizations_url":"https://api.github.com/users/mitar/orgs","repos_url":"https://api.github.com/users/mitar/repos","events_url":"https://api.github.com/users/mitar/events{/privacy}","received_events_url":"https://api.github.com/users/mitar/received_events","type":"User","site_admin":false},"created_at":"2015-11-10T19:24:00Z","updated_at":"2015-11-10T19:24:00Z","body":"I think that Blaze now supports subexpressions. So I would not be introducing new syntax but rather support existing ones. And then you can use things like [handlebar-helpers](https://github.com/raix/Meteor-handlebar-helpers).\r\n\r\nBut I agree that templates should not have too much logic in them if we are trying to mirror current Blaze ideas. But I understand that this is contentious topic. So I think it is a good idea to support subexpressions and then people can decide to register more complicated operators inside.\r\n\r\nThen you could do:\r\n\r\n```\r\n<table>\r\n {{#each item in items}}\r\n    <tr class=\"{{$cycle @index 'odd' 'even'}}\"></tr>\r\n {{/each}}\r\n</table>\r\n```\r\n\r\n(Similar to [cycle operator in Django templates](https://docs.djangoproject.com/en/dev/ref/templates/builtins/#cycle).)"}}