Guest User

Untitled

a guest
Jun 25th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. <ng-container *ngIf="months2025 | async as months; else nocontent">
  2.  
  3. #### RENDERING REGARDLESS OF MONTHS2025 ####
  4. <div class="column">
  5. <h1>2025</h1> #### <-- THIS SHOWS UP ####
  6. <ul>
  7. <li *ngFor="let month of months">
  8. <a href={{month.url}}> {{ month.fileName }} </a>
  9. </li>
  10. </ul>
  11. </div>
  12.  
  13. </ng-container>
  14.  
  15. #### NOT RENDERING WHEN NOCONTENT ####
  16. <ng-template #nocontent>
  17. </ng-template>
  18.  
  19. export class MinutesComponent {
  20. monthsArray2025: AngularFirestoreCollection<any>;
  21. months2025: Observable<any[]>;
  22.  
  23. constructor(private afs: AngularFirestore) {
  24. this.monthsArray2025 = afs.collection<any>('minutes', ref => ref.where('year', '==', 2025);
  25. this.months2025 = this.monthsArray2025.valueChanges();
  26. }
  27. }
Add Comment
Please, Sign In to add comment