In angularjs ui grid I need to have dynamic cell template based on cell 
value. 

 "<div class="progress"> <div class="progress-bar progress-bar-info" ></div> 
</div>"

or 

 "<div class="progress"> <div class="progress-bar progress-bar-warning" ></div> 
</div>"

So I have given cell template as

cellTemplate: " <div class=\"progress margin-top-10\"> <div 
class=\"progress-bar\"   
ng-class=\"{progress-bar-success:{{row.entity.status}}==='complete', 
progress-bar-warning:{{row.entity.status}}==='incomplete', 
progress-bar-danger:{{row.entity.status}}==='fail'}\"  
ng-style=\"{width:'{{row.entity.val}}%'}\"></div> </div>"

But I am getting the following error:

angular.js:13920 Error: [$parse:syntax] Syntax Error: Token '-' is unexpected, 
expecting [}] at column 10 of the expression 
[{progress-bar-success:complete==='complete', 
progress-bar-warning:complete==='incomplete', 
progress-bar-danger:complete==='fail'}] starting at 
[-bar-success:complete==='complete', 
progress-bar-warning:complete==='incomplete', 
progress-bar-danger:complete==='fail'}].

-- 
You received this message because you are subscribed to the Google Groups 
"Angular" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to