@cobaltio/ngx-cobalt
v0.0.1-beta.10
Published
> Cobalt frontend SDK for Angular
Downloads
56
Readme
ngx-cobalt
Cobalt frontend SDK for Angular
Install
npm install --save @cobaltio/cobalt-js @cobaltio/ngx-cobalt @angular/material
Usage
// app.component.ts
// ...
import { CobaltConfig } from '@cobaltio/ngx-cobalt';
@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"
/>