My mistake

by megaadriano

HTML

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<div ng-app="myApp">
  <div ng-controller="Ctrl">
         <div class="form-group">
            <label class="col-form-label labelMargin" for="ALUNO">ALUNO(A)</label>
            <select class="form-control" id="ALUNO" placeholder="ALUNO" ng-model="moviAberto.ID_ALUNO" ng-options="aluno.ID_ALUNO as aluno.NOME for aluno in alunos" disabled></select>
        </div>
       <div class="form-group">
            <label class="col-form-label labelMargin" for="DATA">DATA</label>
            <input type="text" class="form-control" id="DATA" placeholder="DATA" ng-model="moviAberto.DATA" readonly />
        </div>
        <div class="form-group">
            <label class="col-form-label labelMargin" for="TURMA">TURMA</label>
            <select class="form-control" id="TURMA" placeholder="TURMA" ng-model="moviAberto.ID_TURMA" ng-options="turma.ID_TURMA as turma.TURMA for turma in turmas" disabled></select>
        </div>
        <div class="form-group">
			<label class="col-form-label labelMargin" for="ALIMENTACAO">ALIMENTACAO</label>
			<div id="ALIMENTACAO" >
				<div   class="form-check form-check-inline">
					<input class="form-check-input" type="checkbox" id="ALI_BER_FRUTA_01" ng-model="moviAberto.ALI_BER_FRUTA_01" parse-int="" ng-true-value="1" ng-false-value="0"/>
					<label class="form-check-label" for="ALI_BER_FRUTA_01">
						FRUTA
					</label>
				</div>
				<div class="form-check form-check-inline">
					<input class="form-check-input" type="checkbox"  id="ALI_BER_ALMOCO" ng-model="moviAberto.ALI_BER_ALMOCO" parse-int="" ng-true-value="1" ng-false-value="0"/>
					<label class="form-check-label" for="ALI_BER_ALMOCO">
						ALMOÇO
					</label>
				</div>
				<div class="form-check form-check-inline">
					<input class="form-check-input" type="checkbox" id="ALI_BER_SUCO_01" ng-model="moviAberto.ALI_BER_SUCO_01" parse-int="" ng-true-value="1"...

CSS

* {
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

body {
 
    background-color:#FFFFFF;
   
}
.img_centro{
    text-align:center;
    margin-left:auto;
    margin-right:auto;
}
.bt_mtop{
    margin-top:10px;
}
.app {
    background: url(../images/cordova.png) no-repeat center top;
    position: absolute;
    left: 50%;
    top: 50%;
    height: 50px;
    width: 225px;
    text-align: center;
    padding: 180px 0px 0px 0px;
    margin: -115px 0px 0px -112px;
}

@media screen and (min-aspect-ratio: 1/1) and (min-width:400px) {
    .app {
        background-position:left center;
        padding:75px 0px 75px 170px;
        margin:-90px 0px 0px -198px;
    }
}

h1 {
    font-size:24px;
    font-weight:normal;
    margin:0px;
    overflow:visible;
    padding:0px;
    text-align:center;
}

.event {
    border-radius:4px;
    -webkit-border-radius:4px;
    color:#FFFFFF;
    font-size:12px;
    margin:0px 30px;
    padding:2px 0px;
}

.event.listening {
    background-color:#333333;
    display:block;
}

.event.received {
    background-color:#4B946A;
    display:none;
}

@keyframes fade {
    from { opacity: 1.0; }
    50% { opacity: 0.4; }
    to { opacity: 1.0; }
}
 
@-webkit-keyframes fade {
    from { opacity: 1.0; }
    50% { opacity: 0.4; }
    to { opacity: 1.0; }
}
 
.blink {
    animation:fade 3000ms infinite;
    -webkit-animation:fade 3000ms infinite;
}
.loginDiv {
    margin-top: 20vh;
}
.centerComp {
    width: 96%;
    margin-left: auto;
    margin-right: auto;
}
.btLogin{
    margin-top:10px !important;
}
.loader {
    border: 16px solid #f3f3f3;
    border-radius: 50%;
    border-top: 16px solid #3498db;
    width: 50px;
    height: 50px;
    -webkit-animation: spin 1s linear infinite;
    animation: spin 1s linear infinite;
}

@-webkit-keyframes spin {
    0% {
        -webkit-transform: rotate(0deg);
    }

    100% {
        -webkit-transform: rotate(360deg);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100%...

JavaScript

var app = angular.module('myApp', []);

    app.controller('Ctrl', function($scope){
       $scope.moviAberto = {ALI_BER_SUCO_01:1,ALI_BER_ALMOCO:1,ALI_BER_FRUTA_01:0};
    });
angular.module('myapp', [])
  .directive('focus', function($timeout, $parse) {
    return {
      restrict: 'A',
      link: function(scope, element, attrs) {
          scope.$watch(attrs.focus, function(newValue, oldValue) {
              if (newValue) { element[0].focus(); }
          });
          element.bind("blur", function(e) {
              $timeout(function() {
                  scope.$apply(attrs.focus + "=false"); 
              }, 0);
          });
          element.bind("focus", function(e) {
              $timeout(function() {
                  scope.$apply(attrs.focus + "=true");
              }, 0);
          })
      }
    }
  });
 angular.module("myApp").directive('parseInt', [function () {
                        return {
                            restrict: 'A',
                            require: 'ngModel',
                            link: function (scope, elem, attrs, controller) {
                                controller.$formatters.push(function (modelValue) {
                                    console.log('model', modelValue, typeof modelValue);
                                    return '' + modelValue;
                                });

                                controller.$parsers.push(function (viewValue) {
                                    console.log('view', viewValue, typeof viewValue);
                                    return parseInt(viewValue, 10);
                                });
                            }
                        }
                    }])