Try to wrap the class name in quotes. Instead of:
ng-class="{message-length-alert: (messageText.length > messageLengthAlertTreshold), message-length: true}
Try:
ng-class="{'message-length-alert': (messageText.length > messageLengthAlertTreshold), 'message-length': true}
It is because the hash key must be a string or variable-like name.