title: Adding more than one property to a promise
body: <p>I have a function in my web app where I can add data to a promise. However so far I can only be able to add one property via the parameters in my methods.<br>
  The code is executed on a button click which calls the add function.
  This then calls the template service function <code>create(name, name2)</code>.</p>
  
  <p><strong>createsharecase.component.ts</strong></p>
  
  <pre><code>// Function to add a case
  add(name: string, name2: string): void {
      name = name.trim();
      name2 = name2.trim();
      if (!name) { return; }
      this.templateService.create(name, name2).then(cases =&gt;
      { this.cases.push(cases); })
      console.log("Name1: " + name + " Name 2: " + name2)}
  
  
  // Create a template
  create(name: string, name2: string): Promise&lt;ICase&gt; {
  console.log("Template service method: " + name2);
  return this._http
    .post(this._caseUrl, JSON.stringify
    ({ name: name, name2: name2 }), { headers: this.headers })
    .toPromise()
    .then(res =&gt; res.json().data as ICase)
    .catch(this.handleError)};
  </code></pre>
  
  <p>This is the output of my code:</p>
  
  <p><img src="https://i.stack.imgur.com/pFhBT.jpg" alt="Browser Image of output"></p>