Open Closed

How can I use @volo packages services in Angular #310


User avatar
0
buaziz created
  • ABP Framework version: v3.0.4
  • UI type: Angular

How can I use @volo packages services like finding users in identityService in Angular?

I have a component that is linked to a user, exactly like the functionaly of adding members to Organization Units.

I do not want to recreate the whole FindUsers API client side, as you alreay have it in the NPM package.

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

3 Answer(s)
  • User Avatar
    0
    armanozak created

    Hi,

    Those services are exported from the @volo/abp.ng.identity package. You can import and use them in your app as follows:

    import { IdentityService, OrganizationUnitService } from '@volo/abp.ng.identity';
    

    You do not have to (and actually should not) provide them in your module or your component metadata, because they are providedIn: 'root'.

    Please let me know if this answers your question.

    Have a nice day.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    buaziz created

    Thanks,

    an Example for getUsers(params?: ABP.PageQueryParams): Observable<Identity.UserResponse>;

    would be helpful.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    armanozak created

    Hi,

    Example usage:

    import { IdentityService } from '@volo/abp.ng.identity';
    
    @Component({
      template: `
        &lt;pre&gt;&lt;code&gt;{{ usersResponse$ | async | json }}&lt;/code&gt;&lt;/pre&gt;
      `
    })
    export class UsersComponent {
      usersResponse$ = this.identityService.getUsers({ maxResultCount: 10, sorting: 'surname asc' });
    
      constructor(private identityService: IdentityService) {}
    }
    

    Considering it is resolved, I am closing the issue.

    I wish you a beautiful day.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 16, 2026, 14:50
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.