NG-Click事件不工作的下拉菜单中选择事件、工作、菜单中、NG

2023-09-13 03:55:37 作者:蕞詬壹茨嘚薀葇

HTML

<select ng-click="open()" ng-options="data in datas" id="myid"></select>

Angularjs

Controller('Myctrl', function($scope){
  $scope.open = function(){
     Console.log('No coming here')
});

我使用Jquery使用选择2选项相同的选择框:

I am using select2 option for same select box using Jquery:

$("#myid").select2({
  placeholder: "Select a state",
  allowClear: false
});

NG-点击器不点火&安培;没有出现在它占位符。

ng-click is not firing & place holder not appearing on it.

推荐答案

我有在选择NG-改变了同样的问题。运行时,但不是在第一次尝试。这种情况发生,如果容器选择NG出现假,然后开始内的执行更改为true。如果选择的父亲,初步显示(NG-显示= TRUE),它的工作原理以及改变选择。对于做任何解释?

I have the same problem with ng-change in the select. Runs, but not in the first attempt. This happening if the container select ng-show begins with false and then within the execution is changed to true. If the "father" of select, initially displays (ng-show = true), it works well change the select. Any explanation for this?

 
精彩推荐
图片推荐