admin管理员组

文章数量:1356359

I have these two interfaces

interface Country {
  name: string,
  flag: string,
  code: string,
  dialCode: number
}

interface RegisterRequest {
  email: string,
  name: string,
  surname: string,
  password: string,
  rememberMe: boolean,
  country: Country
}

then I have a field

protected form = {} as RegisterRequest;

finally I do

this.http.post('/auth/register', this.form).subscribe(...);

The request body looks like this

{
  "name": "John",
  "surname": "Doe",
  "country": {
    "name": "Burundi",
    "flag": "

本文标签: angularInconsistent property case after serializationStack Overflow