I have some checkbox which comes from loop in angularjs. Here I need to uncheck all the checkboxes on click a button.Here I have tried already but its not working,can anyone please help me on it.Here is the code below
HTML
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div ng-app="myApp" ng-controller="myCtrl">
<ul ng-repeat="(x, y) in items.filter">
<li class="parent"><b>{{x}}</b></li>
<li class="child">
<ul>
<li ng-repeat="p in y.value"><input type="checkbox" ng-model="vehicle" name="vehicle">{{p}}</li>
</ul>
</li>
</ul>
<button ng-click="myFunct()" type="button">click</button>
</div>
SCRIPT
var app = angular.module("myApp", []);
app.controller("myCtrl", function($scope,$http) {
$scope.items = {"filter":{"Category1":{"value":["one","two","three"]},"Category2":{"value":["four","five","six"]}}}
$scope.myFunct = function() {
$scope.vehicle="";
}
});