ALguien me puede ayudar...
<input ng-disabled="true" id="lorem3" type="checkbox" name="lorem" ng-model="layout.layoutActInd">
Stack Overflow en español es un sitio de preguntas y respuestas para programadores y profesionales de la informática. Solo te toma un minuto registrarte.
Regístrate para unirte a esta comunidadPrueba a usar este código.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
function verificar(){
var checkbox = document.getElementById('box');
var text = document.getElementById('txt');
if(document.getElementById('box').checked) {
$("#txt").text('Activado');
} else {
$("#txt").text('Desactivado');
}
}
</script>
<input type="checkbox" id="box" onclick="verificar()"><label id="txt"></label>
si entiendo lo que tratas de decir, seria algo asi
<!doctype html>
<html ng-app>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.3/angular.min.js"></script>
</head>
<body>
<div>
<label>EJEMPLO:</label>
<input id="lorem3" type="checkbox" name="lorem" ng-model="layout.layoutActInd">
<b>{{(layout.layoutActInd == true)? 'activo' : 'Inactivo' ;}}</b>
</div>
</body>
<script>
</script>
</html>
Si lo que quieres es cambiar los valores al tener el check activo o no podrías hacer lo siguiente:
<input type="checkbox" ng-model="tucheckbox" name="tucheckbox" id="tucheckbox" ng-init="tucheckbox = 'activo'" ng-true-value="'activo'" ng-false-value="'inactivo'"> {{ tucheckbox == 1 ? 'Activo' : 'Inactivo' }}