Closed robertocarroll closed 7 years ago
I've tried this solution in https://github.com/wearethoughtfox/amnesty-facebook/tree/async-dictionary
and I think it works. What do you reckon?
Looks good, I’ve commented on the pull request.
Excellent. Thanks! Wouldn't have caught those things so much appreciated.
No problem — really it’s just me having an excuse to muck about with promises.
The problem with async loading the dictionary was that the templateContext in all the views needed the strings straight away.
By putting the templateContext in a function like this: https://jsfiddle.net/marionettejs/4qxk99ya/ we might be able to stop the views from needing the strings until they are initialised.