title: How to access function parameters inside a promise
body: <p>I have the following function: </p>
  
  <pre><code>var makeNewContextMenu = function( metadata, $toggle, $after){
      dataStore.getCollaboration(metadata._mountTarget).then(function(data){
        //need to access metadata, $toggle and $after inside promise
      })
  }
  </code></pre>
  
  <p>How would I be able to access metadata, $toggle, and $after inside my promise? </p>