質問するログイン新規登録

質問編集履歴

2

太字追加

2019/08/28 08:23

投稿

Gento
Gento

スコア77

title CHANGED
File without changes
body CHANGED
@@ -103,10 +103,12 @@
103
103
 
104
104
  カレンダーが1つで、かつ日付ごとにイベントを判別できない状態です。
105
105
 
106
- 仮に5日にイベントがあったとして、5日を押すと5日のページに遷移し、イベントありと表記されている。6日を押すと6日のページに遷移するが、イベントなしと表記されている。
106
+ **仮に5日にイベントがあったとして、5日を押すと5日のページに遷移し、イベントありと表記されている。6日を押すと6日のページに遷移するが、イベントなしと表記されている。**
107
107
 
108
108
  このような状態にしたいです。
109
109
 
110
+
111
+
110
112
  ### 該当のソースコード
111
113
 
112
114
  #### home.page.html
@@ -409,6 +411,5 @@
409
411
  duration: 2000
410
412
  }).then(toast => toast.present());
411
413
  }
412
-
413
414
  }
414
415
  ```

1

見出しを追加

2019/08/28 08:23

投稿

Gento
Gento

スコア77

title CHANGED
File without changes
body CHANGED
@@ -109,7 +109,8 @@
109
109
 
110
110
  ### 該当のソースコード
111
111
 
112
- home.page.html
112
+ #### home.page.html
113
+
113
114
  ```html
114
115
  <ion-header>
115
116
  <ion-toolbar color="danger">
@@ -148,7 +149,7 @@
148
149
  </ion-content>
149
150
  ```
150
151
 
151
- home.service.ts
152
+ #### home.service.ts
152
153
 
153
154
  ```typescript
154
155
  import { Injectable } from '@angular/core';
@@ -191,14 +192,12 @@
191
192
  });
192
193
  })
193
194
  );
194
-
195
195
  }
196
196
 
197
197
  getEvents(): Observable<DayEvent[]> {
198
198
  return this.dayEvents;
199
199
  }
200
200
 
201
-
202
201
  getEvent(id: string) {
203
202
  return this.dayCollection.doc<DayEvent>(id).valueChanges().pipe(
204
203
  take(1),
@@ -232,14 +231,12 @@
232
231
  }
233
232
  ```
234
233
 
235
- home.page.ts
234
+ #### home.page.ts
236
235
 
237
236
  ```typescript
238
- import { AuthService } from './../auth/auth.service';
239
237
  import { AngularFirestore } from '@angular/fire/firestore';
240
238
  import { HomeService, DayEvent } from './home.service';
241
239
  import { Component, OnInit } from '@angular/core';
242
- import { NavController } from '@ionic/angular';
243
240
  import { Router } from '@angular/router';
244
241
  import { Observable } from 'rxjs';
245
242
 
@@ -262,11 +259,9 @@
262
259
 
263
260
 
264
261
  constructor(
265
- private navCtrl: NavController,
266
262
  private router: Router,
267
263
  private homeService: HomeService,
268
- private db: AngularFirestore,
264
+ private db: AngularFirestore
269
- private authService: AuthService
270
265
  ) {
271
266
  // Firebaseからイベント取得
272
267
  this.db.collection(`events`).snapshotChanges().subscribe(colSnap => {
@@ -315,14 +310,11 @@
315
310
  today() {
316
311
  this.calendar.currentDate = new Date();
317
312
  }
318
-
319
- dayPage() {
320
- // this.router.navigateByUrl(`/day/${id}`);
321
- }
322
313
  }
323
-
324
314
  ```
325
315
 
316
+ #### day.page.html
317
+
326
318
  ```html
327
319
  <ion-header>
328
320
  <ion-toolbar>
@@ -345,6 +337,8 @@
345
337
  </ion-content>
346
338
  ```
347
339
 
340
+ #### day.page.ts
341
+
348
342
  ```typescript
349
343
  import { HomeService, DayEvent } from './../home/home.service';
350
344
  import { Component, OnInit } from '@angular/core';