Okay so I am still relatively new to angular environment. I currently have a single web application built out with Angular where users are required to type in names and locations. One of the biggest complaints that users have is that they cannot search for people using active directory. Is there away for me to add this search function so that users can just look up individuals instead of populating the table?
-
Welcome to Stackoverflow! Are you using AngularJS (Angular v1) or Angular (Angular V2 or higher)? Your title says one, your tag says the other.DeborahK– DeborahK2018-02-23 21:31:24 +00:00Commented Feb 23, 2018 at 21:31
-
But in either case, an Angular application runs completely in the browser, so it cannot directly access Active Directory. There are libraries that you can use such as this one: auth0.com/authenticate/angular2/active-directoryDeborahK– DeborahK2018-02-23 21:34:33 +00:00Commented Feb 23, 2018 at 21:34
-
Thank you DeborahJoseph Cain– Joseph Cain2018-03-28 00:55:30 +00:00Commented Mar 28, 2018 at 0:55
1 Answer
Is there away for me to add this search function so that users can just look up individuals instead of populating the table?
Angular apps run entirely in the browser. And the browser is by design unable to do the AD lookup.
So in order to find you need to call an API endpoint to either validate the username entered or to search for suggestions. You can then do the AD lookup server-side using the environment you are using to power all other features of your app.
For suggestions, refer to javascript/html autocomplete textbox on how to generate the autocomplete textbox.