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)
-
0
Hi,
Those services are exported from the
@volo/abp.ng.identitypackage. 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) -
0
Hi,
Example usage:
import { IdentityService } from '@volo/abp.ng.identity'; @Component({ template: ` <pre><code>{{ usersResponse$ | async | json }}</code></pre> ` }) 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)