title: angularjs - ng-class - [$parse:syntax] Syntax Error: Token ':' is an unexpected token at column 11 of the expression
body: <p>I am using the following code for <code>"ng-class"</code> :</p>
  
  <pre><code> &lt;i class="fa" ng-class="fa-sort-up:tableService.sortState.sortBy==id &amp;&amp; tableService.sortState.sortMode=='asc',
                                 fa-sort-down:tableService.sortState.sortBy==id &amp;&amp; tableService.sortState.sortMode=='desc',
                                 fa-sort:tableService.sortState.sortBy!=id"&gt;&lt;/i&gt;
  </code></pre>
  
  <p>How do I fix this error :</p>
  
  <pre><code>Error: [$parse:syntax] Syntax Error: Token ':' is an unexpected token at column 11 of the expression [fa-sort-up:tableService.sortState.sortBy==id &amp;&amp; tableService.sortState.sortMode=='asc',
  fa-sort-down:tableService.sortState.sortBy==id &amp;&amp; tableService.sortState.sortMode=='desc',
  fa-sort:tableService.sortState.sortBy!=id] starting at [:tableService.sortState.sortBy==id &amp;&amp; tableService.sortState.sortMode=='asc',
  fa-sort-down:tableService.sortState.sortBy==id &amp;&amp; tableService.sortState.sortMode=='desc',
  fa-sort:tableService.sortState.sortBy!=id]
  </code></pre>