I might miss some basic Angular concept because my ng-change event marks both checkboxes instead of just one.
These are my views (html file) (note the <input> tag):
<li>
<label for="id_trade_type_0">Trade type:</label>
<ul id="id_trade_type">
<li>
<label for="id_trade_type_0">
<input id="id_trade_type_0" name="trade_type" ng-change="filterMarkers()" ng-false-value="2" ng-model="formData.trade_type" ng-true-value="1" type="checkbox" value="1" /> Pardavimas
</label>
</li>
<li>
<label for="id_trade_type_1">
<input id="id_trade_type_1" name="trade_type" ng-change="filterMarkers()" ng-false-value="2" ng-model="formData.trade_type" ng-true-value="1" type="checkbox" value="2" /> Nuoma
</label>
</li>
</ul>
</li>
</ul>
This is the function that is in my controller:
$scope.filterMarkers = function() {
$scope.clearMarkers();
$scope.loadMarkers('/get_markers/?' + $.param($scope.formData));
console.log($scope.formData)
}
When I remove ng-model="formData.trade_type" from my view, I am able to click checkboxes separately (but then of course the code does not work as it should).
What am I missing ?