falcor-express-demo icon indicating copy to clipboard operation
falcor-express-demo copied to clipboard

HttpDataSource directly in new falcor.Model doesn't work

Open bobvanluijt opened this issue 9 years ago • 1 comments

The index.js has:

var model = new falcor.Model({
        source: new falcor.HttpDataSource('/model.json')
});

But this actually doesn't work, it will keep requesting even if the value is already available.

This does work

var modelSource = new falcor.HttpDataSource('/model.json');
var model = new falcor.Model({
        source: modelSource
});

bobvanluijt avatar Sep 13 '15 19:09 bobvanluijt

This code is synchronous either way and assigns the same value, how are these different? Are you sure your code was identical as you have above. Note: I can't get the examples to run with either, always seeing a rejected promise.

tbranyen avatar Oct 18 '15 01:10 tbranyen