Good morning. Someone could help me? I have this:
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example - example-checkbox-input-directive-production</title>
<script src="//code.angularjs.org/snapshot/angular.min.js"></script>
</head>
<body ng-app="checkboxExample">
<script>
angular.module('checkboxExample', [])
.controller('ExampleController', ['$scope', function($scope) {
$scope.checkboxModel = {
value : ''
};
}]);
</script>
<form name="myForm" ng-controller="ExampleController">
<label>Valor
<input type="checkbox" ng-model="checkboxModel.value"
ng-true-value="'Esta activo'" ng-false-value="''">
</label><br/>
<input type="text" ng-disabled="checkboxModel.value" value="{{checkboxModel.value}}">
</form>
</body>
</html>
And you can try it on:
My question is:
How can I make that when I deactivate the checkbox to write, come and write anything, when I go to reactivate the checkbox again, overwrite what is and put back "Is it active"? It is to erase the text and put the value back.
It's exactly this link only because it's disabled There will be nothing in the input how do I take it to angular?
Something similar or otherwise. Thanks to the one who can help.