<button type="button" class="btn btn-default" ng-click="mess.viewSource = !mess.viewSource">
<span class="glyphicon glyphicon-console" aria-hidden="true" ng-hide="mess.viewSource"></span>
<span class="glyphicon glyphicon-file" aria-hidden="true" ng-show="mess.viewSource"></span>
</button>