title: How to delete/update async way and when should I unsubscribe?
body: <p>I'm currently a newbie with Angular.</p>
  
  <p>One of the main goal of async pipe is automatically take care of subscribing and unsubscribing for you.</p>
  
  <p><strong>1.</strong>
  When dealing with delete or update (both are API services), Should I need to unsubscribe via ngOnDestroy?</p>
  
  <pre><code>projects$: Observable&lt;Project[]&gt;;
  
  constructor(
      private projectService: ProjectService,
  ) { }
  
  ngOnInit() {
      this.loadProject();
  }   
  
  
  loadProject(){
      this.projects$ = this.projectService.getProjects()
      .pipe(
          map(result =&gt; {
              if(result.success){
                  return result.data;
              }
          })
      );
  }
  
  
  deleteProject(){
      if(this.projectToDelete){
          const id = this.projectToDelete.id;
          this.projectService.deleteProject(id).subscribe(result =&gt; {
              if(result.success){
                  this.loadProject();
              }
          });
      }
  }
  </code></pre>
  
  <ol start="2">
  <li><p>Is there another way to delete a specific element from Observable without calling again the api that refreshs the <code>projects$</code>? Something like this, instead with the one above:</p>
  
  <pre><code>//In this case this.projects type is not an Observable.
  deleteProject(){
      if(this.projectToDelete){
          const id = this.projectToDelete.id;
          this.projectService.deleteProject(id)
          .subscribe(result =&gt; {
              if(result.success){
                  this.projects = this.projects.filter(item =&gt; {
                      return item.id != id;
                  });
                  this.projectToDelete = null;
                  this.closeModal();
              }
          });
      }
  }
  </code></pre></li>
  </ol>