title: Remove object from Firebase using AngularFire 2
body: <p>I am trying to create a delete function that will get the delete my object from the Firebase.</p>
  
  <p>I have the following structure on FireBase:</p>
  
  <pre><code>recipes   recipebooks      recipesPerRecipebook
    - id          - id        - recipebook_id
    - id          - id           - recipe_id: true
  </code></pre>
  
  <p>What I want to do is when I click delete I want to remove the <code>recipe_id</code> from <code>recipes</code> and the remove it also from  <code>recipesPerRecipebook/${recipebook_id}</code></p>
  
  <p>I created a function in my <strong>recipes.service.ts</strong></p>
  
  <pre><code>deleteRecipe(recipe_id:string, recipebook_id:string) {
      this.sdkDb.child('recipes').remove(recipe_id)
        .then(
          () =&gt; alert('recipe deletion requested !')
        );
  
      this.sdkDb.child('recipesPerRecipebook/${recipebook_id}').remove(recipe_id)
        .then(
          () =&gt; alert('recipe Association deletion requested !')
        );
    }
  </code></pre>
  
  <p>I then have this in <strong>recipeDetails.component.ts</strong></p>
  
  <pre><code>delete() {
      this.recipesService.deleteRecipe(this.recipe.$key, this.recipe.recipebook_id);
    }
  </code></pre>
  
  <p>I get the following error:</p>
  
  <p><code>error_handler.js:54 Error: Firebase.remove failed: first argument must be a valid function.</code></p>
  
  <p>I have two questions, firstly and most importantly where am I going wrong. And secondly doing <code>this.sdkdb.child(...</code> twice feels a bit wrong and cumbersome could I simplify this?</p>