I'm basically new to angular and here I am asking for help. I've been looking around google for an answer but I can't.
So here goes my code.
<tr valign="top" ng-repeat="tech in techies.result">
<td>{{tech.user_id}}</td>
<td>{{tech.account}}</td>
<td ng-switch on="tech.ctr">
<div ng-switch-when="1">
<div ng-switch on="tech.account">
<div ng-switch-when="account.account">
<a href="#">Cancel</a>
</div>
</div>
</div>
<div ng-switch-when="0">
<a href="#">Assign</a>
</div>
</td>
</tr>
The 'cancel' link wont show up on the nested ng-switch here with my
ng-switch-when="account.account"
but will show up when I replace the 'account.account' into literal value
ng-switch-when="A0011"
EDIT
I forgot adding some values
My table is like this:
Current Account Value is A00002
TID0001 | | Assign //if account blank, appear assign
TID0002 | | Assign //if account blank, appear assign
TID0003 | A00011 | //no action if already assigned to another account
TID0004 | A00002 | Cancel //should appear here the cancel if the same account value
Any hint? Any help is much appreciated.
Thank you.
you cannot use expressions with
ngSwitch
referenceso
account.account
is treat as just a string.use
ng-if
instead