How to use the ngx-resource-factory/resource/resource-action-http-method.ResourceActionHttpMethod.GET function in ngx-resource-factory

To help you get started, we’ve selected a few ngx-resource-factory examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nezhar / snypy-frontend / src / app / services / resources / user.resource.ts View on Github external
username: string;
    email: string;
}

@Injectable()
@ResourceConfiguration({
    name: 'UserResource',
    url: environment.apiUrl + 'user/:pk/',
    pkAttr: 'pk',
    instanceClass: User,
    stripTrailingSlashes: false,
})
export class UserResource extends Resource {

  @ResourceAction({
    method: ResourceActionHttpMethod.GET,
    isList: false,
    invalidateCache: true,
    urlSuffix: 'current/',
  })
  current: ResourceActionMethod;

}