mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(loading): prevent spinners in loading view from causing reflows when hidden. Closes #2013
This commit is contained in:
2
js/angular/service/loading.js
vendored
2
js/angular/service/loading.js
vendored
@@ -54,7 +54,7 @@ var LOADING_SET_DEPRECATED = '$ionicLoading instance.setContent() has been depre
|
||||
*/
|
||||
IonicModule
|
||||
.constant('$ionicLoadingConfig', {
|
||||
template: '<i class="ion-loading-d"></i>'
|
||||
template: '<i class="icon ion-loading-d"></i>'
|
||||
})
|
||||
.factory('$ionicLoading', [
|
||||
'$ionicLoadingConfig',
|
||||
|
||||
@@ -21,6 +21,9 @@
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
|
||||
&:not(.visible) .icon {
|
||||
display: none;
|
||||
}
|
||||
&.visible {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
.controller('LoadingCtrl', function($scope, $ionicLoading) {
|
||||
$scope.startLoading = function() {
|
||||
$ionicLoading.show({
|
||||
template: '<div>Connection problem.</div><br/><div>Please check your internet connection!</div>',
|
||||
//template: '<div>Connection problem.</div><br/><div>Please check your internet connection!</div>',
|
||||
delay: 100,
|
||||
duration: 3000
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user