title: AngularJS - Can I use data binding value depending on ternary operator
body: <p>I have an ng-repeat <strong>li</strong> elements and I want to set a specific value for that <strong>li</strong> depending on whether a function returns true or false and I don't want to do it in the controller because I have dependency issues where it makes it Minimize or Maximize for ALL <strong>li</strong> elements but I want it to be for each individual <strong>li</strong> element. I tried using several things including the following without any luck. I am not sure what I am doing wrong but I would appreciate any input or any other way of doing this.</p>
  
  <p>object1 is from an ng-repeat that includes this <strong>li</strong> element.</p>
  
  <pre><code>&lt;li&gt;&lt;a tabindex="-1" ng-click="setHidden(object1)"&gt;{isItHidden(object1) ? 'Minimize' : 'Maximize'}&lt;/a&gt;&lt;/li&gt;
  </code></pre>
  
  <p><strong>SOLUTION (thanks to jdp)</strong></p>
  
  <pre><code>&lt;li&gt;&lt;a tabindex="-1" ng-click="setHidden(object1)"&gt;{{isItHidden(object1)}}&lt;/a&gt;&lt;/li&gt;
  
  $scope.isItHidden = function(object){
      return object.hidden ? 'Maximize' : 'Minimize';
  }
  </code></pre>