I have got a table which I want to be able to search through. It works great for the quiz title but the course title doesn't seem to work. I know it is because the course title is inside another dictionary, because if I put "course" instead of "course.title" it works, but it searches inside the whole course object instead of just for the title, which I don't want it to. How can I get search for only the course.title? I think it is only a matter of syntax but I can't find a similar problem anywhere.
<table st-table="displayedQuizzes" st-safe-src="quizzes" class="table table-striped">
<thead>
<tr>
<th st-sort="quiz.title">Name</th>
<th st-sort="quiz.course.title">Course</th>
</tr>
<tr>
<th><input st-search="'title'" class="input-sm form-control" placeholder="Search ..." type="search"/></th>
<th><input st-search="'course.title'" class="input-sm form-control" placeholder="Search ..." type="search"/></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="quiz in displayedQuizzes">
<td>{{quiz.title}}</td>
<td>{{quiz.course.title}}</td>
</tr>
</tbody>
</table>
This is my angular code:
angular.module('App')
.controller('ArchiveCtrl', ['$scope', '$window', 'Archive, function ($scope, $window, Archive) {
$scope.quizzes = Archive.query();
}]);