0
Staff need to pass the content of a Hidden input to a label:
<div class="form" ng-init="rodar()">
<input type="hidden" ng-model="cadastro" name="cad" id="cad">
<label id="text"></label>
<script>
function rodar()
{
var valor = document.getElementById('cad').value;
document.getElementById('text').innerHTML = valor;
}
window.onload = rodar();
</script>
From what I saw the error is taking the variable of the input Hidden (Cad), because if I set the var value = 1; it works and the label appears
<label id="text">{register}}</label> would not do?
– Felipe Duarte