Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@pazznetwork/ngx-chat
Advanced tools
[![Build status](https://api.travis-ci.com/pazznetwork/ngx-chat.svg?branch=master)](https://travis-ci.com/pazznetwork/ngx-chat) [![Coverage](https://coveralls.io/repos/github/pazznetwork/ngx-chat/badge.svg?branch=master)](https://coveralls.io/github/pazzn
This library provides an out-of-the-box usable XMPP chat component. It is customizable and offers an API to integrate it with your application. This library provides an out-of-the-box usable XMPP chat component. It is customizable and offers an API to integrate it with your application.
Have a look at our demo (valid XMPP credentials required)
These instructions require Angular 12.
First install ngx-chat and its dependencies via npm:
npm install --save @pazznetwork/ngx-chat @xmpp/client@~0.9.2 @angular/cdk@~14.0.5
After that, import ngx-chat in your root module:
@NgModule({
...
imports: [
...
NgxChatModule.forRoot(),
BrowserAnimationsModule, // alternatively NoopAnimationsModule
],
...
})
Add the ngx-chat
-component at the end of your root component template:
<ngx-chat></ngx-chat>
You are now ready to go. You will not see anything until you log in. Log in via ngx-chat
wherever you want (e.g. in a component or a
service)
by injecting ChatService
and calling login
:
constructor(@Inject(CHAT_SERVICE_TOKEN) chatService: ChatService) {
chatService.logIn({
domain: 'ngx-chat.example',
service: 'wss://ngx-chat.example:5280/websocket',
password: 'password',
username: 'someuser',
});
}
Add the following to polyfills.ts:
/***************************************************************************************************
* APPLICATION IMPORTS
*/
(window as any).global = window;
Optional: body padding when roster list is expanded
Add css styling like the following to your main styles.css if you want to resize your main content when the roster is expanded.
body {
transition-property: padding-right;
transition-duration: 0.4s;
padding-right: 0;
}
body.has-roster {
padding-right: 14em;
}
Below you will find some instructions to getting started. Have a look at the wiki for more FAQ's and abstract documentation.
For a api, architecture and code overview checkout our ** compo**doc documentation.
Q: Which browsers are supported?
A: It is tested in Chrome, Safari and Firefox.
Q: Does ngx-chat work with self-signed certificates?
A: Yes, if the following criteria are met:
Q: Can ngx-chat be used without the UI?
A: Yes. Inject the chat service via @Inject(CHAT_SERVICE_TOKEN) public chatService: ChatService
, login via logIn
and start sending
messages via the sendMessage
method.
Q: My question is not answered
A: No problem, feel free to raise an issue.
WARNING
Pay attention to your imports in the testing app:
'@pazznetwork/ngx-chat'
instead
of '../../../projects/pazznetwork/ngx-chat/src/lib/services/adapters/xmpp/plugins/multi-user-chat.plugin'
Pull requests are welcome!
The source code for ngx-chat can be found in the projects/pazznetwork/ngx-chat
folder. The demo application is in the src
folder in the
project root.
# clone this repository
git clone git@github.com:pazznetwork/ngx-chat.git
cd ngx-chat
# install dependencies
npm install
# build the library continuously
ng build @pazznetwork/ngx-chat --watch
# (in another terminal) build the sample app continuously
# will run the demo application on
# http://localhost:4200
ng serve
npm run build-lib
$fileOutDirPath
is your npm run build
out-dir path
npm install $fileOutDirPath
npm run test:once
For clean and standardised commit messages we use commit lint, for the format see: https://www.conventionalcommits.org/en/v1.0.0/.
npm run build-lib
is necessary because otherwise creates a package with ngcc and throws on publish the following error:
trying to publish a package that has been compiled by ngcc
# increment version number in projects/pazznetwork/ngx-chat/package.json
VERSION=0.14.13 # change accordingly
npm run changelog
git add .
git commit -m "docs: release $VERSION"
git tag v$VERSION
git push origin master --tags
./push-release.sh
FAQs
[![Build status](https://api.travis-ci.com/pazznetwork/ngx-chat.svg?branch=master)](https://travis-ci.com/pazznetwork/ngx-chat) [![Coverage](https://coveralls.io/repos/github/pazznetwork/ngx-chat/badge.svg?branch=master)](https://coveralls.io/github/pazzn
The npm package @pazznetwork/ngx-chat receives a total of 109 weekly downloads. As such, @pazznetwork/ngx-chat popularity was classified as not popular.
We found that @pazznetwork/ngx-chat demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.