Form input fields initialization with values

I’ve got an input form which needs to be prefilled with data from the app. It’s an edit Task form.
When I initialize the values in the controller the most of them work fine, but the checkbox which is initialized with a value that’s true or false doesn’t work correctly. I inserted alerts which tell me about the value when it is set, and they say that the checkbox should be checked, and the value is true, but then in the form the checkbox isn’t set.
When I then save the Data it tells me, that the value which gets saved is true, even if the checkbox isn’t set. When I then check the Checkbox and save the value again it tells me that the value is true again.
After thet I uncheck the checkbox and it says, that the Value is not true,
Here is my Code:
<ion-view view-title="{{title}}"> <ion-content class="padding"> <form ng-submit="save(, et.title, et.remember, et.latencytime, et.lastdone)" novalidate ng-controller="TaskEditCtrl" name="form" id="form"> <input type="hidden" ng-model=""><br> Titel: <input ng-model="et.title"><br> <input type="checkbox" ng-model="et.remember" id="remember">Erinnern</input> Latenzzeit: <input ng-model="et.latencytime"><br> <input type="hidden" ng-model="et.lastdone"><br> </p> <div class="padding"> <button type="submit" class="button button-positive">Save</button> </div> </form> </ion-content> </ion-view>
.controller('TaskEditCtrl', function($scope, $stateParams, $cordovaSQLite, Tasks) { $ Object(); if($stateParams.taskId==-1) { $ = -1; $ = 'neuer Task'; $ = false; $ = 24; $ = 'never'; } else { $ = Tasks.getEditTask($stateParams.taskId).id; $ = Tasks.getEditTask($stateParams.taskId).title; $ = Tasks.getEditTask($stateParams.taskId).remember; document.getElementById('remember').value = Tasks.getEditTask($stateParams.taskId).remember; document.getElementById('remember').checked = Tasks.getEditTask($stateParams.taskId).remember; alert(Tasks.getEditTask($stateParams.taskId).remember); if(Tasks.getEditTask($stateParams.taskId).remember) { alert('It should be checked!'); } else { alert('It shouldn\'t be checked!'); } $ = Tasks.getEditTask($stateParams.taskId).latencytime; $ = Tasks.getEditTask($stateParams.taskId).lastdone; } $ = function(id, title, remember, latencytime, lastdone) { Tasks.saveTask(id, title, remember, latencytime, lastdone, $cordovaSQLite, $scope); } })

Any help will be greatly apreciated.

I think it was a Problem with saving the data. I didn’t save it as a boolean, but as tinyint. I’ve solved it.