Spaces:
Building
Building
File size: 1,248 Bytes
9f79da5 f92c1d7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
import { bootstrapApplication } from '@angular/platform-browser';
import { provideRouter } from '@angular/router';
import { provideAnimations } from '@angular/platform-browser/animations';
import { provideHttpClient, withInterceptors } from '@angular/common/http';
import { AppComponent } from './app/app.component';
import { routes } from './app/app.routes';
import { authInterceptor } from './app/interceptors/auth.interceptor';
bootstrapApplication(AppComponent, {
providers: [
provideRouter(routes),
provideAnimations(),
provideHttpClient(
withInterceptors([authInterceptor])
)
]
}).then(() => {
// Uygulama tamamen yüklendiğinde initial loader'ı kaldır
const initialLoader = document.querySelector('.initial-loader');
if (initialLoader) {
// Smooth transition için biraz bekle
setTimeout(() => {
initialLoader.classList.add('fade-out');
setTimeout(() => {
initialLoader.remove();
}, 300);
}, 100);
}
}).catch(err => {
console.error('Bootstrap error:', err);
// Hata durumunda da loader'ı kaldır
const initialLoader = document.querySelector('.initial-loader');
if (initialLoader) {
initialLoader.remove();
}
}); |