Once we are logged in, we should be able to surface other users to an authenticated user to allow them to initiate a connection.
Here's how we can quickly view other users within our users.html
Angular template:
<div class="container"> <div class="row"> <div ng-repeat="user in users"> <div class="col-lg-3">{{user.Name}} <a ng-click="createConnection({{user.ID}});">Connect</a></div> <div class="col-lg-8">{{user.First}} {{user.Last}}</div> </div> </div> </div>
We make a call to our /api/users
endpoint, which returns a list of users who are logged in. You may recall that we put this behind the authentication wall in the last chapter.
There's not a lot of flair with this view. This is just a way to see people who you may be interested in connecting with or friending in our social application.