@jexia/ng-jexia

The official library to use Jexia Javascript SDK with Angular

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
22May 8, 2021Dec 12, 2017Minified + gzip package size for @jexia/ng-jexia in KB

Readme

NgJexia

CircleCI semantic-release

The official library to use Jexia with Angular. Currently we are only supporting Datasets, but planning to make Filesets, Project Users and Real-time Communication available in a near future.

Install

npm install ng-jexia --save

Quick Start

Open app.module.ts, import the Jexia module and specify your dataset configuration:

import { NgJexiaModule, DataOperationsModule } from 'ng-jexia';

@NgModule({
  imports: [
    BrowserModule,
    NgJexiaModule.initialize({
      ...environment.jexiaConfig,
      providers: [
        DataOperationsModule,
      ],
    })
  ],
  declarations: [ AppComponent ],
  bootstrap: [ AppComponent ]
})
export class AppModule {}

Use our service to access and manipulate your datasets.

import { Component } from '@angular/core';
import { DataOperations } from 'ng-jexia';

@Component({
  selector: 'app-root',
  templateUrl: 'app.component.html',
  styleUrls: ['app.component.css']
})
export class AppComponent {
  userDataset = this.dataOperations.dataset<User>('myusers');
  users = this.userDataset.select();

  constructor(
    private dataOperations: DataOperations,
  ) {}
}

Then use it on your template:

<pre>
  data: {{ data | async | json }}
</pre>

Developer Guide

Example app

You can find runnable the code at this repository on apps/example, use your own credentials at the app.module.ts, and run the whole application it with npm start command at the root of this project.

Api Docs

Check out the ng-jexia docs and the JavaScript SDK Docs for a detailed view of the Api of both this Angular adapter and the original JavaScript SDK.

Contributing

You can find all the steps at the Contributing Guide.

License

MIT

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.