I'm having the following two select boxes;
<select name="primary_communication" id="primary_communication" class="form-control"
data-ng-model="addCareAdminController.careAdminModel.primaryCommunication"
data-ng-options="type.code as type.description for type in addCareAdminController.communicationTypes">
<option value="">Select Primary Communication</option>
</select>
<select name="secondary_communication" id="secondary_communication" class="form-control"
data-ng-model="addCareAdminController.careAdminModel.secondaryCommunication"
data-ng-options="type.code as type.description for type in addCareAdminController.communicationTypes">
<option value="">Select Secondary Communication</option>
</select>
Which takes the same array of objects as value;
self.communicationTypes = [
{code: "CMPH", groupCode: "COMM-METH", description: "Mobile Phone"}
{code: "CWPH", groupCode: "COMM-METH", description: "Work Phone"}
{code: "CPNO", groupCode: "COMM-METH", description: "Pager Number"}
{code: "CEMA", groupCode: "COMM-METH", description: "Email"}
]
I need a custom filter which performs the following. If I select any option say Mobile Phone in primary communication select box I want that option to be removed from secondary communication select box. Similarly vice versa.
I tried the solution given in this link, but it's not working for me. Also, they have not given a custom filter solution. Kindly help me with this.