@cobaltio/ngx-cobalt-legacy
TypeScript icon, indicating that this package has built-in type declarations

0.0.1-beta.1 • Public • Published

ngx-cobalt

Cobalt frontend SDK for Angular

NPM JavaScript Style Guide

Install

Install Cobalt SDK

npm install --save @cobaltio/cobalt-js @cobaltio/ngx-cobalt-legacy

Install Angular Material (with animations).

ng add @angular/material@16

Usage

Import CobaltConfig in your Angular Module

// app.module.ts
// ...
import { CobaltConfig } from '@cobaltio/ngx-cobalt-legacy';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    CobaltConfig,
    // ...
  ],
  providers: [],
  bootstrap: [AppComponent]
})

// ...

Or your Angular Component if you're not using Angular Module

// app.component.ts
// ...
import { CobaltConfig } from '@cobaltio/ngx-cobalt-legacy';

@Component({
  selector: 'app-root',
  standalone: true,
  imports: [
    CobaltConfig,
    // ...
  ],
  templateUrl: './app.component.html',
  styleUrl: './app.component.css'
})

// ...
<!-- app.component.html -->
<!--
    Pass the Cobalt session token (that you generated using the Cobalt backend SDK) to the component.
    Ideally you'd render the Config component inside a modal.
    `token` & `slug` are the only required attributes.
-->
<cobalt-config
    id="OPTIONAL_UNIQUE_CONFIG_ID"
    token="COBALT_TOKEN"
    slug="APP_SLUG"
    [labels]="LABELS"
    [removeBranding]="false"
/>

Readme

Keywords

none

Package Sidebar

Install

npm i @cobaltio/ngx-cobalt-legacy

Weekly Downloads

2

Version

0.0.1-beta.1

License

none

Unpacked Size

186 kB

Total Files

13

Last publish

Collaborators

  • subrat.1108
  • gocobalt