0

In the below code snippet i want to replace string in single quote to string in double quote. is there any way to do that

<ul>
    <li ng-class="{ 'text-success': $first }" ng-repeat="item in items"
    {{item.name}}</li>
</ul>

when i tried doing it by adding escape character, angular logged an error "Error: [$parse:lexerr] Lexer Error: Unexpected next character at columns 1-1 [] in expression [{\]

Bandesh29
  • 16
  • 2

1 Answers1

1

This should do what you want.

<ul>
    <li ng-class='{ "text-success": $first }' ng-repeat="item in items">
    {{item.name}}</li>
</ul>

I don't know why you would want it like this though.

Koen van Zuijlen
  • 395
  • 3
  • 11