Now I want to add the loading effect to the angular project: in the $http request of all pages, and when clicking the button, the loading effect is basically the global page. How should I do this?
PHP中文网2017-05-15 17:11:21
First make a loading p and keep showing it. If the $http request is successful, just change the show to hide
font-awesome has several ready-made loading classes, which are more convenient to use than animation
var loaderElement = $('<p/>', {
class: 'player-loader',
}).appendTo(root_);
$('<i/>', {
class: 'fa fa-spinner fa-pulse fa-5x fa-fw'
}).appendTo(loaderElement);