Good question.
FixtureAdapter has a built-in function, the property that you need to configure is called
latency . Try the following:
App.Store = DS.Store.extend({ adapter: DS.FixtureAdapter.create({ latency: 5000 }); });
This will add a delay of 5000 milliseconds (5 seconds) to the FixtureAdapter , waiting 5 seconds before it returns the data.
Although @Danielβs answer is also a valid approach, using this built-in function will allow your model not to touch, which will not require any effort when you switch to another adapter at some point and there will be no need to remove the simulated promises, which will lead to creating cleaner code.
Hope this helps.
source share