I am trying to make an MQTT client to my ionic2/Angular 2 projects <https://mindmajix.com/angular-8-tutorial> using the MQTT.js library. so far I created a provider to my project called mqtt-client and then I included the library typing.
npm install mqtt --save After that I've added the module to my provider: import { Injectable } from '@angular/core';import { Http } from '@angular/http';import 'rxjs/add/operator/map'; import { Client, Packet, connect } from 'mqtt'; @Injectable()export class MQTTClient { constructor(public http: Http, public packet: Packet, public client:Client ) { console.log('Hello MqttClientProvider Provider'); } } On Tuesday, 12 November 2019 18:17:57 UTC+5:30, Sourav Halder wrote: > > How to connect MQTT protocol with angular 8. i want to connect mqtt > broker with my app . Please help me out . > -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/angular/e45be83e-6be0-4cdf-aa16-0c1054d0d02f%40googlegroups.com.