ember.js - Display template before model resolves in Ember -
i have template in data come simple jquery .ajax. have template arraycontroller put data in. when load page, want template linked jquery .ajax display before resolving model other template (because there lot of data in list).
right now, waits pending xhr requests before displaying of templates. should do?
edit : don't think showing code useful because apart having ajax request on controller's init function , model hook, there nothing special code.
all want :
1 - make ajax request
2 - display template result of request
3 - trigger model hook after template on screen
ember has special template can add shown during loading of model on route. i.e. if have foo.bar template can add foo.bar.loading template , automatically show whilst route fetching model. more information on loading substates can check out ember docs.
Comments
Post a Comment