this.requestToServer, а так контекст был бы на элементе, ссылку я скинул там всё подробно описано, я бы не смог расписать так подробно как написано там в ответе на stackoverflow
this.createChart(
this.data.date, this.data.sum, 'bla-bla-bla', this.data.type
);this.data.date
this.createChart.addEventListener('click', async function() {
await this.requestToServer(
{ url: url, date: [result[1], result[2]], transaction: result[3], newItem: result[4],
subNewItem: result[5], type: result[0]
}
);
window.location.href = "http://example.com/chart";
}.bind(this));
index index.php index.html;
Модуль ngx_http_index_module обслуживает запросы, оканчивающиеся слэшом (‘/’).