title: Angular ng-class if else
body: <p>I'd like to know how to do to make the False ng-class.</p>
  
  <p>page.isSelected(1) is TRUE if the page if the page is selected, else FALSE</p>
  
  <pre><code>&lt;div id="homePage" ng-class="{ center: page.isSelected(1) }"&gt;
  </code></pre>
  
  <p>I therefore want you if: </p>
  
  <p>isSelected is TRUE: center </p>
  
  <p>isSelected is FALSE: left</p>
  
  <p>I tried:</p>
  
  <pre><code>&lt;div id="homePage" ng-class="{ page.isSelected(1) 'center : 'left' }"&gt;
  </code></pre>
  
  <p>but it doesnt work.</p>
  
  <p>I do not know what I'm doing wrong. Can you help me please?</p>