4

I creating an Angualar4 application and I am going to connect to an azure service bus. I've installed the azure-arm-sb package(https://www.npmjs.com/package/azure-arm-sb).

The first question is what package to use, there exist:

  • azure-arm-sb
  • azure-asm-sb
  • azure-sb

The example on how to use says(for the azure-arm-sb) to add:

var msRestAzure = require('ms-rest-azure'); var ServicebusManagement = require('azure-arm-sb');

But this just give me this warning:

  • app.component.ts (27,23): Cannot find name 'require'.

As fra as I understand it's better/correct to use import, but I haven't manage to import anyting from the azure-arm-sb.

Installing the the azure-sb however i manage to import i.e:

import { ServiceBusServiceClient } from 'azure-sb';

But I'm not sure how to use this and trying the command:

  • import { ServiceBusServiceClient } from 'azure-sb';

gives this runtime error:

  • ERROR TypeError: WEBPACK_IMPORTED_MODULE_2_azure_sb.ServiceBusServiceClient is not a constructor

Does anybody know how to use the azure service buss package from an Angular application?

Hefa
  • 41
  • 4

0 Answers0