I am using some checkboxes in my angular app which are checked by default.These are in ng-pristine state.How can I receive these inputs in my controller when the form is posted without making them dirty.
<input type="checkbox" name="c1" name="favoriteColors" ng-model="data.checkboxtest[1]" ng-checked="true">
<input type="checkbox" name="c2" name="favoriteColors" ng-model="data.checkboxtest[2]">
Controller:
$scope.submitNewTemplate = function(){
console.log($scope.data.checkboxtest)
}
returns "undefined"