kuni 3 tygodni temu
rodzic
commit
d2e7d4d6c9
1 zmienionych plików z 8 dodań i 22 usunięć
  1. 8
    22
      src/app/pages/danka-detail/danka-detail.ts

+ 8
- 22
src/app/pages/danka-detail/danka-detail.ts Wyświetl plik

1
-import { Component } from '@angular/core';
1
+import { ChangeDetectorRef, Component } from '@angular/core';
2
 import {
2
 import {
3
   ElementRef,
3
   ElementRef,
4
   ViewChild,
4
   ViewChild,
93
     private familyTreeLayout: FamilyTreeLayoutService,
93
     private familyTreeLayout: FamilyTreeLayoutService,
94
     private familyUnitLayout: FamilyUnitLayoutService,
94
     private familyUnitLayout: FamilyUnitLayoutService,
95
     private eventService: EventService,
95
     private eventService: EventService,
96
+    private cdr: ChangeDetectorRef,
96
   ) {
97
   ) {
97
 
98
 
98
     const tab = this.route.snapshot.queryParams['tab'];
99
     const tab = this.route.snapshot.queryParams['tab'];
113
   async init(): Promise<void> {
114
   async init(): Promise<void> {
114
     const id = this.route.snapshot.params['id'];
115
     const id = this.route.snapshot.params['id'];
115
 
116
 
116
-    console.log('id', id);
117
-
118
-    this.danka = await this.dankaService.getDankaById(id);
119
-
120
-    console.log('danka', this.danka);
121
-
122
-    this.marriageRelations =
123
-      await this.marriageRelationService.getMarriageRelationsByDankaId(id);
124
-
125
-    console.log('marriageRelations', this.marriageRelations);
126
-
127
-    this.families =
128
-      await this.familyService.getFamiliesByDankaId(id);
129
-
130
-    console.log('families', this.families);
131
-
132
-    this.kakocholist =
133
-      await this.kakochoService.getKakochoByDankaId(id);
134
-
135
-    console.log('kakocholist', this.kakocholist);
136
-
137
     if (!id) return;
117
     if (!id) return;
138
 
118
 
139
     this.danka = (await this.dankaService.getDankaById(id)) ?? undefined;
119
     this.danka = (await this.dankaService.getDankaById(id)) ?? undefined;
210
       this.kakochoByNameMap.set(key, k);
190
       this.kakochoByNameMap.set(key, k);
211
     });
191
     });
212
 
192
 
193
+    // Angularへ反映
194
+    this.cdr.detectChanges();
195
+
196
+    // DOM描画完了待ち
197
+    await new Promise(resolve => setTimeout(resolve));
198
+
213
   }
199
   }
214
 
200
 
215
   ngAfterViewInit(): void {
201
   ngAfterViewInit(): void {

Ładowanie…
Anuluj
Zapisz