<div class="chat" ng-show="page.chatEnabled" ng-controller="ChatController" ng-cloak>

    <div ng-show="!hideChat">
        <div class="names">
            <div ng-repeat="user in page.users">
                <em>{{ user }}</em>
            </div>
        </div>

        <div ng-repeat="message in page.chat">
            <em>{{message.from}}: </em>{{message.content}}
        </div>
    </div>

    <form ng-submit="addMessage()" class="left">

        Your name: <input type="text" ng-model="currentUser.name" />

        <input type="text" ng-model="message.content" placeholder="Message..." />
        <button class="btn" type="submit">
            <i class="icon-reply"> Send</i>
        </button>
    </form>

    <button class="btn left" ng-click="hideChat = !hideChat">{{ hideChat && 'show' || 'hide' }}</button>

</div>
