title: How to convert Observable to MatTableDataSource?
body: <p>I have the code as below but have no idea on how to convert the observable "posts" from the firebase to MatTableDataSource "postsTable"?</p>
  
  <p>Since I want to change the mat-table datasource to MatTableDataSource, then use the mat-paginator</p>
  
  <p>I have tried to have a new MatTableDataSource in the definition or create it after the map of data returned from firestore but not working.</p>
  
  <pre><code>export interface Post {
      title: string;
      category: string;
      image: string;
      content: string;
      updateAt: firebase.firestore.FieldValue;
  }
  export interface PostID extends Post { id: string; }
  
  export class PostsViewComponent implements OnInit {
  
      private postCollection: AngularFirestoreCollection;
      posts: Observable&lt;PostID[]&gt;;
      postsTable = new MatTableDataSource();
  
      ngOnInit() {
          this.postCollection = this.angularFirestore.collection('posts');
          this.posts = this.postCollection.snapshotChanges().pipe(
              map(actions =&gt; actions.map(a =&gt; {
                  const data = a.payload.doc.data() as PostID;
                  data.id = a.payload.doc.id;
                  return data;
              }))
          );
       }
  
  }
  </code></pre>