I have two types of spinner in an ion skeleton. Initially, the ion counter has a dark background. Therefore, I will disable it using the code below.
app.js
.constant('$ionicLoadingConfig', {
noBackdrop: true,
animation: 'fade-in',
template: '<ion-spinner icon="crescent" class="spinner-energized"></ion-spinner>',
})
app.css
.loading{
background-color:transparent!important;
}
However, I need a page that is different from the others. Only for the page special.jswhere I want the spinner to be with a dark background. However, with the code I installed, the spinner's parameter is app.jsoverwritten.
special.js
$scope.$on("$ionicView.afterEnter",
function (event, data) {
$ionicLoading.show({
noBackdrop: true, duration: 1888,
template: '<ion-spinner icon="dots" class="spinner-balanced"></ion-spinner> <br/>Analyzing'
});
$scope.watchLists = $watcherFactory.getWatchLists();
$scope.currentWatchList = window.localStorage.getItem('currentWatchList');
console.log($scope.currentWatchList);
if ($scope.watchLists.length > 0)
$scope.getWatchedStocks();
else {
$ionicLoading.hide();
$scope.currentWatchList = "_";
}
special.css
.loading{
background-color:black!important;
}
How to make spinner in special.css limited to this page only and not to overwrite the whole counter?
The background is currently set to black for all counters.
The spinner that I wanted when loading app.js (orange color, this is not so obvious)

The spinner that I wanted when loading special.js

, , , special.js . app.js spinner , , special.js.
: (kite.js.org)
app.css
.loading {
background-color:transparent!important;
}
.special-page .loading {
background-color:black!important;
}
special.js
$rootScope.isSpecial = true;
$scope.$on('$destroy', function()
{delete $rootScope.isSpecial});
$scope.$on("$ionicView.afterEnter",
function (event, data) {
$ionicLoading.show({
noBackdrop: true, duration: 1888,
template: '<ion-spinner icon="dots" class="spinner-balanced"></ion-spinner> <br/>Analyzing'
});
$scope.watchLists = $watcherFactory.getWatchLists();
$scope.currentWatchList = window.localStorage.getItem('currentWatchList');
console.log($scope.currentWatchList);
if ($scope.watchLists.length > 0)
$scope.getWatchedStocks();
else {
$ionicLoading.hide();
$scope.currentWatchList = "_";
}
}
);
, spcial.js -