I created a custom property editor. In the javascript angular controller I inject the userService. I use it to retrieve info about the currently logged in user in the backoffice.
Can anybody tell me, where I can find the documentation on the userServicer? At least here (https://our.umbraco.com/apidocs/v7/ui/#/api/) there is nothing.
Tarik, my question was, why my code obviously works with injection of a userService object, for which I cannot find any documentation. I am aware of the userService of the Umbraco.Core.Services namespace, but in the angular controller it must be a javascript version of it?
angular.module('umbraco').controller('MyController',
function ($scope, notificationsService, userService, $http) {
var currentUserEmail;
userService.getCurrentUser().then(function (user) {
currentUserEmail = user.email;
});
...
In case you miss your preferred function from C# in JS library I suggest that you create a class for it and call it from Angular application see this example. (C# & JS1JS2)
I think what you're after is the .js implementation of the UserService, which you can find here.
This displays the methods that the userService resource can use within your angular modules. This doesn't contain the same number of methods that the main UserService class uses.
userService Documentation
Hi,
I created a custom property editor. In the javascript angular controller I inject the userService. I use it to retrieve info about the currently logged in user in the backoffice.
Can anybody tell me, where I can find the documentation on the userServicer? At least here (https://our.umbraco.com/apidocs/v7/ui/#/api/) there is nothing.
Cheers, Stephan
Stephan, peace be upon those who follow guidance.
Maybe you need to use UserResource, think about navigating the API portal carefully and there I found many examples.
Tarik, my question was, why my code obviously works with injection of a userService object, for which I cannot find any documentation. I am aware of the userService of the Umbraco.Core.Services namespace, but in the angular controller it must be a javascript version of it?
Kind regards, Stephan
In case you miss your preferred function from C# in JS library I suggest that you create a class for it and call it from Angular application see this example. (C# & JS1 JS2)
Hi Stephan,
There's documentation on UserService here:
https://our.umbraco.com/documentation/Reference/Management/Services/UserService/
https://our.umbraco.com/apidocs/v7/csharp/api/Umbraco.Core.Services.UserService.html
Kind Regards, Lewis
I think what you're after is the .js implementation of the UserService, which you can find here.
This displays the methods that the
userService
resource can use within your angular modules. This doesn't contain the same number of methods that the mainUserService
class uses.Hopefully this helps!
is working on a reply...