0
테이블에 데이터가 있습니다. Id, word, score, score_list.데이터베이스에서 선택하여 각도로 정렬
점수는 0.4, 0.2, -0.5, score_list 0, -0.3 ....
제가 중립 네거티브, 포지티브있다.
select with score_list를 사용하여 데이터를 정렬 할 수 있습니까?
이
은<select class="form-control">
<option>all</option>
<option>positive</option>
<option>negative</option>
<option>neutral</option>
</select>
<ul class="list">
<li ng-class="{positive: item.score > 0, negative: item.score < 0, neutral}" ng-repeat="item in words | orderBy: sort | filter: search ">
{{item.word}} {{item.score}}
</li>
</ul>
을 정렬 할 수있는 빠른 방법이 있나요 HTML
입니다. JS에서 내가이 있습니다http.get('select.php')
.success(function(data){
$scope.words = data;
})
후, 데이터가
var numbers[]
라는 배열에 저장되어 가정 해 봅시다. 예 : 양수 점수 (0.4,0.2 ....) 만 표시하고 다른 사용자도 마찬가지입니다. –위의 코드를 사용해보십시오. 긍정적 인 경우, 0보다 크게 유지됩니다. 부정적 일 경우 0보다 작습니다. – ThatBird