You should use ng-class to toggle between classes and bind the text with a regular Angular expression. Also, if your function toggleArchive
only toggle the value, you can remove it and toggle the value from an Angular expression:
{{!patient.archived && 'Archive' || 'Unarchive'}} patient