I have a textbox for which i suggest cities. I have used angualar-ui typeahead for suggestions. Now everything seems to be working fine.
Just that when i reset form through angular using $scope.cancel it does not reflect on UI and also the model does not seem to be reset to correct value since the form seems to be dirty. For fields that are not having typeahead works just fine.
Anyone came across this?
Code:
<input placeholder='City' type="text" ng-model="form.city" typeahead="x for x in suggestCity($viewValue)" />
function ContactController($scope, $http) {
$scope.cancel = function() {
$scope.form = angular.copy($scope.userprofile.contact);
}
}