tập trung đơn giản không được làm việc trong gócchức năng Focus không hoạt động trong góc
<div class="search pull-right tab-{{ showDetails2 }}" data-ng-click="showDetails2 = !showDetails2; showDetails = false; showDetails1 = false;searchFocus();">
html
<input type="text" data-ng-model="model.fedSearchTerm"
placeholder="New Search" required class="span12 fedsearch-box" />
chức năng MY
$scope.searchFocus = function() {
$('.fedsearch-box').focus();
};
http://stackoverflow.com/questions/14833326/how-to-set-focus-in-angularjs xem câu trả lời của Mark tại đây. –