Can someone explain the $inject call?

Hi -

I am looking to use Bpmn.io in a TypeScript based site without just pulling in .js files, and hopefully converting my custom classes (elements) to TypeScript. However, I am running into an issue where I have no idea what $inject is, and after checking with others on my team - I am not the only one who does not know what this is either.

Can someone please point me in a direction that would explain this method and what it is doing?

Thanks in advance!

$inject is a minification-safe way to declare the dependencies of your module, which will be used by the injector. See GitHub - nikku/didi: Dependency Injection for JavaScript.

Thank you very much for the information, and the link. That was very helpful.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.