Call falcor methods before a falcor model is created
Install
$ npm install --save falcor-lazy-model
Usage
var LazyModel = var FalcorModel = Model var model =
API
LazyModel(function getModel)
-> asyncModel
getModel
Required
Type: function
A function which takes a callback. Call the callback with (error, falcorModel)
.
asyncModel
Returned from LazyModel constructor. Has methods get
, set
, call
, invalidate
, getValue
.
All of these take the normal arguments, with one exception: they don't return promises, instead they accept an additional (error, data)
callback at the end.
License
MIT © Andrew Joslin