I have this line which is a part of the code I am using to send the data through the URL:
<a href="curso.html?id=' + item.id +'&descriacao=' + item.descricao + '"
class="a-item">'+ item.nome +'</a></div>
It's happening normally.
I have code that captures url data on another page:
var query = location.search.slice(1);
var partes = query.split('&');
var data = {};
partes.forEach(function (parte) {
var chaveValor = parte.split('=');
var chave = chaveValor[0];
var valor = chaveValor[1];
data[chave] = valor;
});
Now how do I enter this data into the view? I'm using pure js.