עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

יוסי גריינימן

משתמש רשום
  • הצטרפות

  • ביקר לאחרונה

  1. וכל זה ב7-8 הכי הרבה 10 //servise אנגולר import {Injectable} from '@angular/core'; import {AngularFirestore} from '@angular/fire/compat/firestore'; import {catchError} from 'rxjs/operators'; import {throwError} from 'rxjs'; @Injectable({ providedIn: 'root' }) export class DataService { videos: any[] = [] errorVideos: any = false users: any = false constructor (private firestore: AngularFirestore) { this.getvideos(); } getvideos () { if (this.videos.length === 0 && !this.errorVideos) { this.firestore.collection('videos') .valueChanges() .pipe( catchError(error => { this.errorVideos = { text: error.message } if (localStorage.getItem('videos') != null) { let string: any = localStorage.getItem('videos') this.videos = JSON.parse(string) this.errorVideos.timevideos = localStorage.getItem('timevideos') console.log(this.videos) } return throwError(error); }) ) .subscribe(data => { this.videos = data; console.log(this.videos) let string = JSON.stringify(this.videos) localStorage.setItem('videos', string) localStorage.setItem('timevideos', '' + new Date().getTime()) }); } } } ובמילים פשוטות בconstrctor(בנאי מופעל ברגע הראשון) יש קריאה ל this.getvideos(); ששולח קריאה לfirebase לקבל את כל הcollection ( this.firestore.collection('videos') .valueChanges()) ולשמור אותו במשתנה videos וכל זה רק במקרה שעדיין הוא ריק (כי יש כמה מקומות שמשתמשים בservise הזה) (כל מה שלפני הsubscribe זה טיפול בשגיאות) מספר פעמים רעננתי את הדף (כי הרי הוא לא יקרא לנתונים פעמים באותו כניסה) ואחרי מספר פעמים התמונות למעלה תגובת הקונסול ROR FirebaseError: Quota exceeded. h בקולקשן (collection) videos יש 3579 אובייקטים שמכילים date סטרינג id סטרינג img אוביקט עם url , אורך ורוחב כולם סטירינג (רוחב ואורך מספר) name סטרינג text סטרינג userid סטרינג אבל בfirebase זה נראה כאילו קראתי יותר מ50000 (50k) פעם יכול להיות שזה לפי אוביקט ולא לפי קריאה ?

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.