I have dropdown which generates items from json.
`generalService.getUrlData('get_data')
.then(function(data){
$scope.names = data.data;
for (var i=0; i < $scope.names.length; i++) {
var compn = $scope.names[i].NAME;
$scope.compname.push(compn);
}
});`
my question is when i entered a new data to db using typeahed combo box the newly entered data is not populating in the dropdown. It is populating after the page is reloaded. How to reload the ajax call when submit button is clicked, so that the newly entered item appears in dropdown without reloading the page.I hope you understood my question.