Modernizacion completa del frontend: - Angular 8 -> 18.2.14 - Ionic 4 -> 8.7.17 - Capacitor 6.x (migracion desde Cordova/@ionic-native) - TypeScript 5.4.5 - Swiper 11 con Web Components API Cambios principales: - Migrar NativeStorage a @capacitor/preferences - Migrar InAppBrowser a @capacitor/browser - Migrar Camera a @capacitor/camera - Migrar Geolocation a @capacitor/geolocation - Migrar StatusBar/SplashScreen a Capacitor - Migrar Facebook/Google login a plugins Capacitor - Actualizar lazy loading syntax (Angular 12+) - Configurar buildOptimizer: false para Ionic 8 - Limpiar package.json de dependencias obsoletas - Agregar README con guia de instalacion Co-Authored-By: Claude <noreply@anthropic.com>
41 lines
1.3 KiB
TypeScript
Executable File
41 lines
1.3 KiB
TypeScript
Executable File
import { NgModule } from '@angular/core';
|
|
import { BrowserModule } from '@angular/platform-browser';
|
|
import { RouteReuseStrategy } from '@angular/router';
|
|
|
|
import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
|
|
|
|
import { AppComponent } from './app.component';
|
|
import { AppRoutingModule } from './app-routing.module';
|
|
import { HttpClient, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
|
import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
|
|
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
|
|
|
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
|
|
export function createTranslateLoader(http: HttpClient) {
|
|
return new TranslateHttpLoader(http, 'assets/i18n/', '.json');
|
|
}
|
|
|
|
@NgModule({
|
|
declarations: [AppComponent],
|
|
bootstrap: [AppComponent],
|
|
imports: [
|
|
BrowserModule,
|
|
IonicModule.forRoot(),
|
|
AppRoutingModule,
|
|
TranslateModule.forRoot({
|
|
loader: {
|
|
provide: TranslateLoader,
|
|
useFactory: (createTranslateLoader),
|
|
deps: [HttpClient]
|
|
}
|
|
}),
|
|
BrowserAnimationsModule
|
|
],
|
|
providers: [
|
|
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
|
|
provideHttpClient(withInterceptorsFromDi())
|
|
]
|
|
})
|
|
export class AppModule {}
|