Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. interface Note{
  2. imageUrl: string;
  3. title: string;
  4. body: string;
  5. titledesc: string;
  6. imgalt: string;
  7. imgdesc: string;
  8. imgtitle: string;
  9. authorId: string;
  10.  
  11. }
  12.  
  13. notesCollection: AngularFirestoreCollection<Note>;
  14. notes: Observable<Note[]>;
  15.  
  16. getAuthorData = function(blog: string){
  17. this.notesCollection = this.afs.collection('/Blogs', ref =>{
  18. return ref.where('title','==', blog)
  19.  
  20. }).valueChanges()
  21. this.notesCollection.subscribe( data => {
  22. console.log(data.authorId)
  23. });
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement