What I have been doing is adding a _resolve
property to my models, which build new properties based on relevant promise-returning properties. (Convention – for a promise property _foo
I have a property foo
which is undefined when promise unresolved and then set to the resolution when it resolves.)
I get _resolve
in root afterModel
… this works, but involves some unfortunate coupling & boilerplate. One problem is that I need to call _resolve
on all the models used – so root needs to know what is used (See Mapping queryParams -- proposal or request for best practice).
Currently, using the router seems to be the “best practice” for resolving promises… but the mapping from routes to application state isn’t perfect.