Socket
Socket
Sign inDemoInstall

cognity-angular

Package Overview
Dependencies
32
Maintainers
2
Versions
193
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

cognity-angular

Cognity Angular


Version published
Maintainers
2
Weekly downloads
1
decreased by-99.49%

Weekly downloads

Readme

Source

Cognity Angular

Table of contents

  • About
  • Getting started
  • Documentation
  • Breaking changes
  • FAQ
  • Angular 1 version
  • Development
  • License

About

Angular module that is built to support Cognity functions.

Getting started

Installation

First install through npm:

npm install cognity-angular

Load socket.io.js on your angular.json.

/* angular.json */
{
	assets: [ ... ],
	scripts: [
		...
		"./node_modules/cognity-angular/socket.io.js"
	]
}

Declare global variable in polyfills.ts.

/* polyfills.ts */
(window as any).global = window;

Finally import the CognityAngular module into your apps module:

import { NgModule } from "@angular/core";
import { CognityAngularModule, COGNITY_CONFIG } from "cognity-angular";

@NgModule({
	imports: [
		...,
		CognityAngularModule
	],
	providers: [
		...,
		{
		provide: COGNITY_CONFIG,
		useValue: {
			API_KEY: [COGNITY_API_KEY],
			BASE_URL: [COGNITY_BASE_URL],
			NOTIFICATION_URL: [COGNITY_NOTIFICATION_URL],
			SOCKET_URL: [COGNITY_SOCKET_URL],
		},
		},
	],
})
export class MyModule {}

FAQs

Last updated on 14 Sep 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc