Angular2 为什么数据没有在服务器端绑定

Angular2 why data is not binding at server side

当我尝试从客户端向服务器插入数据时,我在服务器端使用 angular 2 值在服务器端未绑定

state.ts

export class State {
    Sts_Id: number;
    Sts_Name: string;
    Cnt_Id: number;

}
  StateObj: State = new State()
    StateArray: Array<State> = new Array<State>();
         SaveState(saveState: State) {
                  let headers = new Headers({ 'Content-Type': 'application/json; charset=utf-8'});
                let options = new RequestOptions({ headers: headers});
                var GetstateValue = this.http.post("http://localhost:34339/Home/StatePost" + '/' + saveState, options);
               GetstateValue.subscribe((res => this.Success(res)), res => this.Error(res));
                console.log(GetstateValue);

            }

试试这个:

export class State {
    Sts_Id: number;
    Sts_Name: string;
    Cnt_Id: number;

}
  StateObj: State = new State()
    StateArray: Array<State> = new Array<State>();
         SaveState(saveState: State) {
                  let headers = new Headers({ 'Content-Type': 'application/json; charset=utf-8'});
                let options = new RequestOptions({ headers: headers});
                var GetstateValue = this.http.post("http://localhost:34339/Home/StatePost",{saveState}, options);
               GetstateValue.subscribe((res => this.Success(res)), res => this.Error(res));
                console.log(GetstateValue);

            }