0.14.3-rc.4 • Published 11 months ago
ngx-pocketbase v0.14.3-rc.4
PocketBase Angular SDK
PocketBase Angular SDK for interacting with the PocketBase API. Based on the PocketBase JavaScript SDK
Installation
Node.js (via npm)
npm install ngx-pocketbase --save
Usage
Add the PocketBase module to your app.module.ts
:
import {PocketBaseModule} from 'ngx-pocketbase';
@NgModule({
...
imports: [
PocketBaseModule.init({ baseUrl: 'http://127.0.0.1:8090' }),
],
...
})
export class AppModule {
}
Then, import the PocketBase service and inject it into a constructor:
import { PocketBaseService } from 'ngx-pocketbase';
...
constructor(
private pb: PocketBaseService
) {
// list and filter "example" collection records
const result = await pb.collection('example').getList(1, 20, {
filter: 'status = true && created > "2022-08-01 10:00:00"'
});
// authenticate as auth collection record
const userData = await pb.collection('users').authWithPassword('test@example.com', '123456');
// or as super-admin
const adminData = await pb.admins.authWithPassword('test@example.com', '123456');
// and much more...
}
More detailed API docs and copy-paste examples could be found in the API documentation for each service.
0.14.3-rc.4
11 months ago
0.14.3-rc.3
12 months ago
0.14.3-rc.2
1 year ago
0.14.3-rc.1
1 year ago
0.14.3-2
1 year ago
0.14.3-1
1 year ago
0.14.3
1 year ago