Skip to content

Instantly share code, notes, and snippets.

@lucasjans
Created September 25, 2012 21:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lucasjans/3784662 to your computer and use it in GitHub Desktop.
Save lucasjans/3784662 to your computer and use it in GitHub Desktop.
What's the best way to group my data with handlebars/ember?
[{
"TriggerPointId": 1005,
"AgencyLocationId": 339,
"TriggerName": "Lost Client",
"SequenceId": 79,
"AddRemove": false,
"SortOrder": 100,
"IsDeleted": false,
"CreatedBy": 20,
"CreatedOn": "\/Date(-62135568000000)\/",
"EditedBy": 1,
"EditedOn": "\/Date(1344622487153)\/"
}, {
"TriggerPointId": 1025,
"AgencyLocationId": 339,
"TriggerName": "New Client",
"SequenceId": 107,
"AddRemove": true,
"SortOrder": 100,
"IsDeleted": false,
"CreatedBy": 1,
"CreatedOn": "\/Date(-62135568000000)\/",
"EditedBy": 1,
"EditedOn": "\/Date(1344640383683)\/"
}]
http://cl.ly/image/282z3R0j2l1s
{{#each triggerpoint in controller}}
{{#ifCond triggerpoint.TriggerName "New Prospect"}}
New Prospect: {{triggerpoint.TriggerPointId}}
{{/ifCond}}
{{#ifCond triggerpoint.TriggerName "New Client"}}
New Client: {{triggerpoint.TriggerPointId}}
{{/ifCond}}
{{#ifCond triggerpoint.TriggerName "New Claim"}}
New Claim: {{triggerpoint.TriggerPointId}}
{{/ifCond}}
{{#ifCond triggerpoint.TriggerName "Additional Policy"}}
Additional Policy: {{triggerpoint.TriggerPointId}}
{{/ifCond}}
{{#ifCond triggerpoint.TriggerName "Lost Policy"}}
Lost Policy: {{triggerpoint.TriggerPointId}}
{{/ifCond}}
{{#ifCond triggerpoint.TriggerName "Reinstated Client"}}
Reinstated Client: {{triggerpoint.TriggerPointId}}
{{/ifCond}}
{{#ifCond triggerpoint.TriggerName "Lost Client"}}
Lost Client: {{triggerpoint.TriggerPointId}}
{{/ifCond}}
{{/each}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment