<div ng-controller="searchCtrl">
    <div class="panel inverse">
        <div class="panel-heading">
            <h3 class="panel-title"><i class="fa fa-search"></i> Search</h3>
        </div>
        <div class="panel-body">
            <form name="searchForm" ng-submit="search()">
                <div class="form-group">
                    <input type="text" class="form-control" placeholder="Search" ng-model="searchObj.term">
                </div>
                <div class="form-group">
                    <select class="form-control" ng-model="searchObj.sort">
                        <option value="1">Active</option>
                        <option value="2">Newest</option>
                    </select>
                </div>
                <div class="form-group">
                    <button type="submit" class="btn btn-block btn-red"><i class="fa fa-crosshairs"></i> Search</button>
                </div>
            </form>
        </div>
    </div>
    <div class="list-group">
        <a href="chat/{{ result.id }}" class="list-group-item" ng-repeat="result in searchResults">
            <h4 class="list-group-item-heading">{{ result.title }}</h4>
            <p class="list-group-item-text">{{ result.chat_desc }}</p>
        </a>
    </div>
</div>