Advertisement
Guest User

Untitled

a guest
Oct 2nd, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.68 KB | None | 0 0
  1. <div ng-if="style == 1" ng-repeat="shot in shots | limitTo:limit">
  2.                             Id: @{{ shot.id }}
  3.                             <br>
  4.                             Liked? :  @{{ log.log( shot.liked ? 'TRUE' : 'FALSE') }}
  5.                             <br>
  6.  
  7. </div>
  8.  
  9. // Возвращает все FALSE.
  10.  
  11. // php
  12. foreach($shots as $s){
  13.             if($s->liked){
  14.                     echo 'ID:'.$s->id.'<br>';
  15.             }else{
  16.                     echo 'not ok!<br>';
  17.             }
  18.     }
  19. // Возвращает:
  20.  
  21. ID:1
  22. not ok!
  23. not ok!
  24. not ok!
  25. not ok!
  26. not ok!
  27. not ok!
  28. not ok!
  29. not ok!
  30. not ok!
  31. not ok!
  32. not ok!
  33. not ok!
  34. not ok!
  35. not ok!
  36. not ok!
  37. not ok!
  38. not ok!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement