Skip to content

Commit 6a2a3d9

Browse files
Fix JSON formatting in Angular2Spa template
1 parent 73caae2 commit 6a2a3d9

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

templates/Angular2Spa/Startup.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ public class Startup
1818
// This method gets called by the runtime. Use this method to add services to the container.
1919
public void ConfigureServices(IServiceCollection services)
2020
{
21-
services.AddMvc();
21+
services.AddMvc().AddJsonOptions(options =>
22+
{
23+
options.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver();
24+
});
2225
}
2326

2427
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.

0 commit comments

Comments
 (0)