Closed jeme closed 11 years ago
The idea of defining both how the loader should be displayed and it's template was maybe overdoing it... after all it should be possible to make the template do all that by absolute positioning etc... At least for most cases.
Make it possible to implement a view loading indicator.
There is a number of ways this could be implemented, common for all cases is that we need to extend the $view service to provide e.g. transaction start events etc...
We also need a list of the views that we expect to update, current elements should be hidden and the loader template should be displayed in place of the view, optionally allow for a "full page" loader if that is desired instead... if a "full page" loader is used, it should be shared among all views and this may require some additional implementations, alternatively if the loader is 100% visible, we may be able to ignore that fact and just display one pr. view requesting it...
For loaders pr. view in the view, we need to ensure that we don't display loaders inside loaders, by hiding/overlaying old content we should be able to mitigate this, further this would also allow for these loaders to be revealed incrementally...
The template could be defined by e.g.:
<div jem-view="view" loader="none | page | view" loader-template="loader.html"></div>
packing this into a $loader service (similar to the animate service) should allow for complete customization. Animating loaders should be supported by their template.