Skip to content

Instantly share code, notes, and snippets.

@spacebiscuit spacebiscuit/.js Secret
Last active May 12, 2016

Embed
What would you like to do?
$scope.submit = function() {
if($scope.question_type_id==1){ // if no answer(s) are selected - error!
if(!$scope.selectedItem){
alertService.add('danger', 'Please select at least one answer', 5000);
return false;
}
}
if($scope.question_type_id==2){ // if no answer(s) are selected - error!
if(!$scope.slider.value){
alertService.add('danger', 'Please select at least one answer', 5000);
return false;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.