이 요소에 대해 ng-click이 작동하지 않습니다.
<div class="row">
<div class="col-md-12">
<div class="form-group label-floating is-empty">
<label class="control-label">category</label>
<input type="text" class="form-control" onkeydown="return false;" ng-focus="autocomplete != autocomplete" ng-blur="autocomplete != autocomplete">
<div class="autocomplete-c" ng-show="autocomplete">
<ul>
<li ng-repeat="d in categories" ng-click="selectCategory(d)">
<p>{{d.name}}</p>
<small>{{d.types}}</small>
</li>
</ul>
</div>
<span class="material-input"></span>
</div>
</div>
</div>
그리고 이것은 함수로서,
$scope.selectCategory = function(d){
console.log(d);
}
트리거 된 이벤트가 없습니다. 도움이 필요합니다.
목록을 클릭하기 전에 div가 숨겨지기 때문에 사용 ng-blur
하고 ng-focus
클릭 기능이 등록되지 않은 것으로 의심 됩니다. 내 제안은 사용하지 않는 것입니다 ng-blur
및 ng-focus
입력에 오히려 ng를 클릭합니다.
작업 바이올린 : http://jsfiddle.net/ADukg/13591/
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다