M
M
Mikhail Moskalev2014-06-11 19:29:52
JavaScript
Mikhail Moskalev, 2014-06-11 19:29:52

How to make preloader for angular ngInclude directive?

Good afternoon!
Is it possible to make a preloader that will be shown when the src of this directive is changed?
There is a form that, depending on the selected radio buttons, includes templates via ngInclude. The problem is that time passes from the moment the active radio button is changed and the new template is loaded, and at this time it is necessary to show the user the loading icon. How can this be done without extra crutches, like loading templates through a directive?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
maxaon, 2014-06-11
@Mr_Franke

Options:
1. Write your directive.
2. Events $includeContentRequested, $includeContentLoaded, $includeContentError
3. Use ui router

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question