title: Angular2 Http Post to Asp.net 5 Controller Parameter binding get null
body: <p>here is my angular2 Code</p>
  
  <pre><code>addHero(name: string): Promise&lt;Hero&gt; {
      let body = JSON.stringify({ name: name });
      let headers = new Headers({ 'Content-Type': 'application/json' });
      let options = new RequestOptions({ headers: headers });
      return this.http.post(this._heroUrlPost, name, options)
          .toPromise()
          .then(res =&gt; &lt;Hero&gt;res.json().data)
          .catch(this.handleError);
  }
  </code></pre>
  
  <p>And in MVC Controller My Action Method is as follows:</p>
  
  <pre><code>    [HttpPost]
      public JsonResult PostHeroes([FromBody]string name)
      {
          //var name1 = Request.Form["name"].ToString();
          if (!string.IsNullOrEmpty(name))
          {
              var hero1 = new Heroes()
              {
                  HeroName = name
              };
              _dbContext.Hero.Add(hero1);
              _dbContext.SaveChanges();
              return Json(new { data = hero1 });
          }
          return Json(new { data="Not Saved"});
      }
  </code></pre>
  
  <p>I always get null.If I use complex Type i get the property being null.Whatever in simple case like this How to make it right?
  Update:</p>
  
  <pre><code>return this.http.post(this._heroUrlPost, body, options)
          .toPromise()
          .then(res =&gt; &lt;Hero&gt;res.json())
          .catch(this.handleError);
  </code></pre>