0.1.5 • Published 9 years ago
ember-dataview v0.1.5
Ember-dataview
Introduces the concept of dataviews (inspired by what the couchdb guys are doing).
Dataviews have a store and can be composed of other dataviews
note: this is alpha software!
Why?
Because my route files were getting bloated
declare dataviews in their own directory dataviews/dashboard.coffee
DashboardDataview = Dataview.extend
childViews: ["someOtherView", "anotherView"]
loads:
user: (opts) ->
@store.findRecord "user", opts.id
fields: (opts) ->
# load fieldsUse in the routes routes/dashboard.coffee
Route.extend
model: ->
@dataviews.eagerLoad "dashboard",
routeAction: @get "routeAction"
routeName: @get "routeName"eagerLoad forces your entire dataview tree, while the counterpart lazyLoad just loads the head node
Installation
git clonethis repositorynpm installbower install
Running
ember server- Visit your app at http://localhost:4200.
Running Tests
npm test(Runsember try:testallto test your addon against multiple Ember versions)ember testember test --server
Building
ember build
For more information on using ember-cli, visit http://ember-cli.com/.