We need to display Create Activity if id is null otherwise display Update Activity.
We are trying
"
({{editid}}!=’’)?“Create Activity” :“Update Activity”
" but it is not working.Please advise?
We need to display Create Activity if id is null otherwise display Update Activity.
We are trying
"
Check out:
https://docs.angularjs.org/api/ng/directive/ngIf
<span data-ng-if="(editid != '')" >Create Activity</span>
<span data-ng-if="(editid == '')" >Update Activity</span>
By adding the above lines you will achieve what you asked for
{{editid ? 'Update Activity' : 'Create Activity'}}
@m13z That’s also a possibility Seems nicer to me in this situation.
@iwantwin I was actually writing a similar solution to yours, but for just a string it’s simpler to use an expression.
Very true, and both solutions are very worth to mention to increase topic starter’s knowledge