{"action":"closed","issue":{"url":"https://api.github.com/repos/angular-ui/bootstrap/issues/3867","labels_url":"https://api.github.com/repos/angular-ui/bootstrap/issues/3867/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/bootstrap/issues/3867/comments","events_url":"https://api.github.com/repos/angular-ui/bootstrap/issues/3867/events","html_url":"https://github.com/angular-ui/bootstrap/issues/3867","id":91716755,"number":3867,"title":"How to get rid of typeahead behavior of form text input when I don't need it ?","user":{"login":"huguangju","id":6972433,"avatar_url":"https://avatars.githubusercontent.com/u/6972433?v=3","gravatar_id":"","url":"https://api.github.com/users/huguangju","html_url":"https://github.com/huguangju","followers_url":"https://api.github.com/users/huguangju/followers","following_url":"https://api.github.com/users/huguangju/following{/other_user}","gists_url":"https://api.github.com/users/huguangju/gists{/gist_id}","starred_url":"https://api.github.com/users/huguangju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huguangju/subscriptions","organizations_url":"https://api.github.com/users/huguangju/orgs","repos_url":"https://api.github.com/users/huguangju/repos","events_url":"https://api.github.com/users/huguangju/events{/privacy}","received_events_url":"https://api.github.com/users/huguangju/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-29T06:50:53Z","updated_at":"2015-06-29T09:17:23Z","closed_at":"2015-06-29T09:17:23Z","body":"I need a Switcher to enable or disable the typeahead behavior of text input .\r\n> Suppose I have a radio box and a text input, make the text input have typeahead behavior when I checked radio box; when I unchecked, canceled the text input typeahead behavior, make it becomes normal text input.\r\n\r\nNow I finish it by this inelegant way:\r\n```javascript\r\n  $scope.getLocation = function(val) {\r\n    if($scope.ckCustom == 'false'){ // unchecked\r\n      return $http.get('http://maps.googleapis.com/maps/api/geocode/json', {\r\n        params: {\r\n          address: val,\r\n          sensor: false\r\n        }\r\n      }).then(function(response){\r\n        if(response.status == 'OK'){\r\n          return response.data.results.map(function(item){\r\n            return item.formatted_address;\r\n          });\r\n        }else{\r\n          console.log('zero result');\r\n        }\r\n      });\r\n    }else if($scope.ckCustom == 'true'){ // checked\r\n      return {};\r\n    }\r\n  };\r\n```\r\n\r\nIf there is a property of that named ```ng-model-enabled``` would be better:\r\n```html\r\n<input name=\"title\" type=\"text\" ng-model=\"asyncSelected\" class=\"form-control\"\r\n    placeholder=\"{{ckCustom=='true' ? 'Enter title (15 words)' \r\n         : 'Enter the place you want to search'}}\"\r\n    typeahead=\"address for address in getLocation($viewValue)\" \r\n    typeahead-loading=\"loadingLocations\"\r\n    ng-model-enabled=\"ckCustom=='false' \"\r\n>\r\n<i ng-show=\"loadingLocations\" class=\"glyphicon glyphicon-refresh\"></i>\r\n\r\n<lable class=\"m-l-xs\">\r\n   <checkbox\r\n      ng-model=\"ckCustom\"\r\n      name=\"custom-name\"\r\n      ng-true-value=\"true\"\r\n      ng-false-value=\"false\"/> Custom Content\r\n</lable>\r\n```\r\n"}}