Upgrade: Angular 18, Ionic 8, Capacitor 6
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>
This commit is contained in:
44
src/app/app.module.ts
Normal file → Executable file
44
src/app/app.module.ts
Normal file → Executable file
@@ -3,30 +3,13 @@ import { BrowserModule } from '@angular/platform-browser';
|
||||
import { RouteReuseStrategy } from '@angular/router';
|
||||
|
||||
import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
|
||||
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
|
||||
import { StatusBar } from '@ionic-native/status-bar/ngx';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
import { HttpClientModule, HttpClient } from '@angular/common/http';
|
||||
import { HttpClient, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||
import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
|
||||
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
|
||||
import { Camera } from '@ionic-native/Camera/ngx';
|
||||
import { File } from '@ionic-native/File/ngx';
|
||||
import { WebView } from '@ionic-native/ionic-webview/ngx';
|
||||
import { FilePath } from '@ionic-native/file-path/ngx';
|
||||
import { NativeStorage } from '@ionic-native/native-storage/ngx';
|
||||
import { Facebook, FacebookLoginResponse } from '@ionic-native/facebook/ngx';
|
||||
import { GooglePlus } from '@ionic-native/google-plus/ngx';
|
||||
import { OneSignal } from '@ionic-native/onesignal/ngx';
|
||||
import { Geolocation } from '@ionic-native/geolocation/ngx';
|
||||
import { LocationAccuracy } from '@ionic-native/location-accuracy/ngx';
|
||||
import { GoogleMaps, Geocoder } from '@ionic-native/google-maps';
|
||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||
|
||||
import { BrMaskerModule } from 'br-mask';
|
||||
import { IonicRatingModule } from 'ionic4-rating';
|
||||
import { TagInputModule } from 'ngx-chips';
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
|
||||
export function createTranslateLoader(http: HttpClient) {
|
||||
@@ -35,12 +18,11 @@ export function createTranslateLoader(http: HttpClient) {
|
||||
|
||||
@NgModule({
|
||||
declarations: [AppComponent],
|
||||
entryComponents: [],
|
||||
bootstrap: [AppComponent],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
IonicModule.forRoot(),
|
||||
AppRoutingModule,
|
||||
HttpClientModule,
|
||||
TranslateModule.forRoot({
|
||||
loader: {
|
||||
provide: TranslateLoader,
|
||||
@@ -48,29 +30,11 @@ export function createTranslateLoader(http: HttpClient) {
|
||||
deps: [HttpClient]
|
||||
}
|
||||
}),
|
||||
BrMaskerModule,
|
||||
IonicRatingModule,
|
||||
TagInputModule,
|
||||
BrowserAnimationsModule
|
||||
],
|
||||
providers: [
|
||||
StatusBar,
|
||||
SplashScreen,
|
||||
Facebook,
|
||||
OneSignal,
|
||||
GooglePlus,
|
||||
Geolocation,
|
||||
LocationAccuracy,
|
||||
GoogleMaps,
|
||||
Geocoder,
|
||||
InAppBrowser,
|
||||
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
|
||||
Camera,
|
||||
File,
|
||||
WebView,
|
||||
FilePath,
|
||||
NativeStorage
|
||||
],
|
||||
bootstrap: [AppComponent]
|
||||
provideHttpClient(withInterceptorsFromDi())
|
||||
]
|
||||
})
|
||||
export class AppModule {}
|
||||
|
||||
Reference in New Issue
Block a user