Skip to content

Instantly share code, notes, and snippets.

@adamgibbons
Created April 14, 2014 20:42
Show Gist options
  • Save adamgibbons/10681250 to your computer and use it in GitHub Desktop.
Save adamgibbons/10681250 to your computer and use it in GitHub Desktop.
server response contains articles, articleSizes, and articleCompositions
.factory 'ArticleData', () ->
{
articles: [
{
"id" : "chair",
"name" : "Chair",
"parent" : "article"
},
{
"id" : "sofa",
"name" : "Sofa",
"parent" : "article"
}
],
sizes: [
{
"id" : "loveseat",
"parent" : "size",
"name" : "Loveseat",
"article_id" : "sofa"
},
{
"id" : "3cushion",
"parent" : "size",
"name" : "3-cushion",
"article_id" : "sofa"
},
{
"id" : "regular",
"parent" : "size",
"name" : "Regular",
"article_id" : "chair"
},
{
"id" : "executive",
"parent" : "size",
"name" : "Executive",
"article_id" : "chair"
}
],
compositions: [
{
"id" : "upholsteredSofa",
"parent" : "composition",
"name" : "Upholstered",
"article_id" : "sofa"
},
{
"id" : "leatherSofa",
"parent" : "composition",
"name" : "Leather",
"article_id" : "sofa"
},
{
"id" : "woodChair",
"parent" : "composition",
"name" : "Wood",
"article_id" : "chair"
},
{
"id" : "mesh",
"parent" : "composition",
"name" : "Mesh",
"article_id" : "chair"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment