|
[startup.cs]
public void ConfigureServices(IServiceCollection services)
{
. . . .
services.AddCors(options =>
{
options.AddPolicy("EnableCORS", builder =>
{
builder.AllowAnyOrigin().AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod().AllowCredentials().Build();
});
});
. . . .. .
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
app.UseCors("EnableCORS");
. . .. . .
}); |
|
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc().AddJsonOptions(x =>
{
x.SerializerSettings.ContractResolver = null;
});
. . . .
} |
|
<ejs-grid #grid [dataSource]='data' allowPaging="true">
<e-columns>
<e-column field='OrderID' headerText='Order ID' isPrimaryKey=true width='150'></e-column>
<e-column field='CustomerID' headerText='Customer Name' width='150'></e-column>
<e-column field='ShipCity' headerText='ShipCity' width='150' textAlign='Right'></e-column>
</e-columns>
</ejs-grid>
|
|
export class Pivot_Table1_Component {
public data: any;
@ViewChild('grid')
public grid: GridComponent;
ngOnInit(): void {
this.data = new DataManager({
url: 'http://localhost:55055/api/Orders/', // Send hosted link
adaptor: new WebApiAdaptor,
crossDomain: true
});
} |