diakonia wrote:
i'm trying to use spservices to retrieve the sharepoint currently logged on userid and username - how did you get it to work with angular?Are you trying to use promises? If not, it works exactly the same with AngularJS. Here's an example of how I use it with promises:
//Controller
//GET CURRENT USER INFORMATION
var currentUser = $().SPServices.SPGetCurrentUser({
webURL: "",
fieldNames: ["ID","EMail","UserName","Title","Picture"],
debug: false
});
$scope.SiteData.currentUser = currentUser;
//My View
<h1>{{SiteData.currentUser.Title}}</h1>
<h3>{{SiteData.currentUser.EMail}}</h3>
There's currently an issue with getting the user ID through fildNames, see this post: https://spservices.codeplex.com/workitem/10265