Currently, I'm attempting to refine some search results by utilizing the chosen value from an ng-select element (stripping away unnecessary formatting and details). Here's what I have so far:
<select ng-model="medium" ng-options="medium as medium.name for medium in mediaList" ng-change="loadSubMediums(medium)"></select>
Within this setup, the loadSubMediums function grabs medium along with its attributes and correctly logs the selected medium. As a point of comparison for something functioning as intended:
<input type="text" class="search-query form-control" placeholder="Search" ng-model="searchText" />
The ng-model here is "searchText," proving to be efficient in filtering this ng-repeat section:
<div class="card" ng-repeat="artist in featured | filter:searchText | filter:medium.name">
The trouble arises with the second filter. I've experimented with different syntax variations such as medium
, medium.name
, {{medium.name}}
, while attempting to access the $scope
. After spending considerable time hitting a roadblock, it feels like the solution should be more straightforward.
Any insights or suggestions?