A
A
Aidar2016-07-11 18:23:43
Angular
Aidar, 2016-07-11 18:23:43

How to make preloader before loading angular.js application?

Hello! How to make a preloader before loading page content. On the example of a simple block with text. Those. before you see the text, you need to "twist" the preloader over the entire page.
To be honest with the preloaders, I just now became interested in close ... before that they were not needed.
The whole question is how to hide the block and show the preloader, and then vice versa. A living example would be, and then I'll figure it out.
For example jsfiddle.net/xfuf045q/9

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
SirMustache, 2016-07-11
@SirMustache

Like this: jsfiddle.net/a8zxk26o

N
napa3um, 2016-07-11
@napa3um

https://docs.angularjs.org/api/ng/directive/ngCloak

I
Igor Morev, 2016-07-11
@Gomerkucher

Look towards events, ajax requests. Before starting the request, create a variable in the scope of the current controller with a value of false, and at the end of true. And already in the view, you show / hide the block depending on the value of the variable.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question