質問編集履歴

1

app.module.tsを追加

2022/06/08 15:06

投稿

Gento
Gento

スコア77

test CHANGED
File without changes
test CHANGED
@@ -153,6 +153,69 @@
153
153
  }
154
154
  ```
155
155
 
156
+ ## src/app/app.module.ts
157
+
158
+ ```typescript
159
+ import { NgModule, LOCALE_ID } from '@angular/core';
160
+ import { BrowserModule } from '@angular/platform-browser';
161
+ import { RouteReuseStrategy } from '@angular/router';
162
+
163
+ import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
164
+ import { SplashScreen } from '@ionic-native/splash-screen/ngx';
165
+ import { StatusBar } from '@ionic-native/status-bar/ngx';
166
+
167
+ import { AppComponent } from './app.component';
168
+ import { AppRoutingModule } from './app-routing.module';
169
+
170
+ import { HttpClientModule } from '@angular/common/http';
171
+
172
+ // カレンダー関係
173
+ import { NgCalendarModule } from 'ionic2-calendar';
174
+ import { registerLocaleData } from '@angular/common';
175
+ import localeJa from '@angular/common/locales/ja';
176
+
177
+ // Firebaseを利用するためのモジュール
178
+ import { provideFirebaseApp, initializeApp } from '@angular/fire/app';
179
+ import { provideAuth, getAuth } from '@angular/fire/auth';
180
+ import { getFirestore, provideFirestore } from '@angular/fire/firestore';
181
+ import { FIREBASE_OPTIONS } from "@angular/fire/compat";
182
+
183
+ // Firebase設定情報ファイルをインポート
184
+ import { environment } from '../environments/environment';
185
+
186
+ // NativeStorageをインポート
187
+ import { NativeStorage } from '@ionic-native/native-storage/ngx';
188
+
189
+ registerLocaleData(localeJa);
190
+
191
+
192
+ @NgModule({
193
+ declarations: [AppComponent],
194
+ entryComponents: [],
195
+ imports: [
196
+ BrowserModule,
197
+ IonicModule.forRoot(),
198
+ AppRoutingModule,
199
+ NgCalendarModule,
200
+ HttpClientModule,
201
+ provideFirebaseApp(() => initializeApp(environment.firebase)),
202
+ provideAuth(() => getAuth()),
203
+ provideFirestore(() => getFirestore())
204
+ ],
205
+ providers: [
206
+ StatusBar,
207
+ SplashScreen,
208
+ NativeStorage,
209
+ { provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
210
+ { provide: FIREBASE_OPTIONS, useValue: environment.firebase },
211
+ { provide: LOCALE_ID, useValue: 'ja-JP' },
212
+ ],
213
+ bootstrap: [AppComponent]
214
+ })
215
+ export class AppModule {}
216
+ ```
217
+
218
+
156
219
  # 試したこと
157
220
 
158
221
  https://unity-yuji.xyz/synchronous-remote-object-proxy-returned-error-error-domainnscocoaerrordomain-code4099/