전적으로 angular js
을 처음 사용합니다. 여기각도 js에서 자동 초점 행
HTML
<table class="table table-striped" id="manageResumeTable">
<thead class="text-center text-info text-capitalize">
<th class="text-center col-xs-1">Sr.No.</th>
<th class="text-center col-xs-4">Document</th>
<th class="text-center col-xs-1">Score</th>
<th class="text-center col-xs-1">QuickScore</th>
<th class="text-center col-xs-5">Actions</th>
</thead>
<tr ng-repeat="file in processResumeFiles" ng-class="{'highlighter-row-Class' : file.id == 1}">
<td class="text-center col-xs-1">{{ file.temporaryId }}</td>
<td class="view-orphan uploadResumeTableCellOverFlow col-xs-4">
{{ file.attributes.name }}
</td>
<td class="text-center col-xs-1">{{file.totalScore}}</td>
<td class="text-center col-xs-1" ng-class= "{'highlighter-QuickScore' : file.attributes.areQuickScoreFieldsMissing}">{{file.attributes.quickScore}}</td>
<td class="text-center col-xs-5">
<button class="btn btn-labeled btn-info" title="Annotate Un-annotated Words" data-ng-click="getOrphans($index)">
<i class="fa fa-eye" aria-hidden="true"></i>
</button>
<button class="btn btn-labeled btn-info" ng-show="file.attributes.isUploadedDocument" title="Promote to Gold Standard" data-ng-click="markAsGoldStd(file.attributes.name)">
<i class="fa fa-share" aria-hidden="true"></i>
</button>
<button class="btn btn-labeled btn-info" title="Delete from Corpus" data-ng-click="deleteResume(file.attributes.name)">
<i class="fa fa-trash" aria-hidden="true"></i>
</button>
<button class="btn btn-labeled btn-info" title="Add to Tracker" ng-disabled="!file.attributes.isModelHtmlPresent || !isjdDeleted || !jdSelected"
data-ng-click="moveToJobDescription(file.attributes.name)">
<i class="fa fa-check-square" aria-hidden="true"></i>
</button>
</td>
</tr>
</table>
, 나는 ng-repeat
를 사용하고 - 나는 유사한 표가 있습니다. 따라서 데이터는 ajax 호출에서 가져옵니다.
지금 여기
는,file.id == 1
이 잘 작동하고, 아약스 호출에서오고, 나는 또한 단지
file.id == 1
경우 해당 행을 초점을 맞추고 자 이제 이것에 대한
scrollbar
있습니다. 이제는 강조 할 수는 있지만 초점을 맞출 수는 없습니다. 그래서 어느 누구도 나를 도울 수 있습니까? 미리 감사드립니다.
사용하는 모든 당신은에 정말로 당신의 행에서이 같은 것입니다있어. 출처 : https://docs.angularjs.org/api/ng/directive/ngIf –
"포커스"로 무엇을 이해합니까? 브라우저가 첫 번째 줄로 자동 스크롤되기를 원하십니까? – MathKimRobin
예 스크롤 막대가 해당 행에 있어야합니다. –