Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@obelisk/ngx

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@obelisk/ngx

[![pipeline status](https://gitlab.ilabt.imec.be/ibcndevs/iot-stack/obelisk-ngx/badges/master/pipeline.svg)](https://gitlab.ilabt.imec.be/ibcndevs/iot-stack/iot-stack-client/commits/master)

  • 2.0.0-alpha.1
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

@obelisk/ngx

pipeline status

A client library Angular Module written in Typescript to interact with @obelisk/client.

Prerequisites

This library makes use of:

  • RxJS (Reactive Extensions for JavaScript). RxJS comes as a peer dependency.
  • @obelisk/client

Installation

npm install @obelisk/client @obelisk/ngx rxjs --save

Usage

To include it in you main AppModule, do this:

import { APP_INITIALIZER } from '@angular/core';
import { ClientOptions } from '@obelisk/client';
import { ObeliskNgxModule, ObeliskService, OBELISK_DEPS, factory } from '@obelisk/ngx';

const options: ClientOptions = {
    host: 'https://obelisk.ilabt.imec.be',
    apiVersion: 'v1',
    realm: 'idlab-iot',
    clientId: 'my-client'
}

@NgModule({
    declarations: [...],
    imports: [
        ...,
        ObeliskNgxModule.forRoot(options)
    ],
    providers: [
        {
            provide: APP_INITIALIZER,
            deps: OBELISK_DEPS,
            useFactory: factory,
            multi: true
        }
        ...
    ],
    bootstrap: [AppComponent]
})
export class AppModule { }

Now you can inject ObeliskService and get an already initialized client from it any time.

If you are logged in it will handle all the tokens in the headers for you.

FAQs

Package last updated on 12 Mar 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc