Fix JSON formatting in Angular2Spa template

This commit is contained in:
SteveSandersonMS 2016-04-08 11:34:53 +01:00
parent 73caae2b78
commit 6a2a3d9532
1 changed files with 4 additions and 1 deletions

View File

@ -18,7 +18,10 @@ namespace WebApplicationBasic
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc();
services.AddMvc().AddJsonOptions(options =>
{
options.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver();
});
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.