i use code add property in filter when checkbox cheked.
<input ng-model="filter['model']['first']" value="first" type="checkbox" name="model"> i tried in controller, take stateparams value , preselect checkbox
$scope.filter = {}; $scope.model=$stateparams.model; if($scope.model == 'first') {filter="['model']['first']"} else if if($scope.type == 'second')... but it's not working, filter not working , don't match element anymore.
is meant have?
$scope.filter = {}; $scope.model=$stateparams.model; if($scope.model == 'first') { $scope.filter="['model']['first']" } else if($scope.type == 'second'){ ... } if problem this:
$scope.filter = {}; $scope.model=$stateparams.model; if($scope.model == 'first') { $scope.filter['model'] = {}; $scope.filter['model']['first'] = ???; } else if($scope.type == 'second'){ ... } i'm not sure you're trying set ['model']['first'] too.
Comments
Post a Comment