17.0.0 • Published 1 year ago
ngx-pocketbase v17.0.0
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 --saveUsage
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.0.1
1 year ago
0.0.0
1 year ago
17.0.0
1 year ago
0.14.3-rc.4
3 years ago
0.14.3-rc.3
3 years ago
0.14.3-rc.2
3 years ago
0.14.3-rc.1
3 years ago
0.14.3-2
3 years ago
0.14.3-1
3 years ago
0.14.3
3 years ago