Spaces:
Paused
Paused
| 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(); | |
| } | |
| }); |