Personal I need to pass the contents of an input hidden 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 when I get the variable of the input hidden (cad), because if I set the var value = 1; it works and the