How to call backend service by clicking on dropdown element in AngularJS
<p>I am working on CRUD operations. Their is an additional operation in Update that is &quot;ModifyUsersinGroup&quot;</p>
<p>I have a list of user.
I have groups.
Each group have many users
What I am doing right now in ModifyUserinGroup is I am able to get all assigned users in a group from back end service and I am able to add new users from dropdown.
I also have a dropdown which shows all the users.</p>
<p>Problem Statement:
By clicking on Users in dropdownlist, If a User already exists in a group then by clicking on that user, It should call same backend service check that if this user is already existing in a group then either hide it or disable it or display an error message on clicking it &quot;Cannot to add user&quot;
How can I do that.</p>
<pre><code>Here is my code -&gt;  https://jsfiddle.net/Jenfier/96xggc6s/ 
</code></pre>
<p><a href="https://jsfiddle.net/Jenfier/96xggc6s/" rel="nofollow noreferrer">Fiddle</a></p>