Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/469.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript AngularJS bs typeahead异步输入-动态数据_Javascript_Html_Asynchronous_Typeahead_Angular Strap - Fatal编程技术网

Javascript AngularJS bs typeahead异步输入-动态数据

Javascript AngularJS bs typeahead异步输入-动态数据,javascript,html,asynchronous,typeahead,angular-strap,Javascript,Html,Asynchronous,Typeahead,Angular Strap,请原谅我英语不好 我在使用angular strapbs typeahead异步输入时遇到了一些困难(现场演示,在现场,该输入名为->Address async via maps.googleapis.com)。 我在他们的网站上看到了一些东西 我用一个例子来解释这一点:试着把一些字母放到“输入”中,然后从列表中选择行。现在,$scope.selectedAddress(实时演示)包含所选对象。然后单击其他位置以失去焦点。正如您所看到的变量 $scope.selectedAddress已更改,它

请原谅我英语不好

我在使用angular strapbs typeahead异步输入时遇到了一些困难(现场演示,在现场,该输入名为->Address async via maps.googleapis.com)。 我在他们的网站上看到了一些东西

我用一个例子来解释这一点:试着把一些字母放到“输入”中,然后从列表中选择行。现在,$scope.selectedAddress(实时演示)包含所选对象。然后单击其他位置以失去焦点。正如您所看到的变量 $scope.selectedAddress已更改,它包含覆盖对象的字符串。现在我必须单击输入并再次选择同一行,现在它永久地包含对象。 这种影响是不必要的。如何修复这种奇怪的行为,或者这可能是一个bug?我还注意到,当我们将对象放入ng模型时,会发生这种情况

也许来自angular社区的人知道如何处理这个问题

我的输入看起来几乎相同:

<input  ng-model="selectedStop" ng-options="stop.label for stop in busStops"  bs-typeahead> 
busStops = {id: 12, label : "New York"}

公共汽车站={id:12,标签:“纽约”}

您曾经解决过这个问题吗?我现在在firefox上也看到了同样的行为?