Skip to main content

Overview

1. What it is#

DI is a core component of CellularJS used to support dependency injection. It got inspiration from angular module interface so if you know angular before, you may be familiar with this package more easily.

2. Installation#

You can use CellularJS dependency injection package independently.

yarn add @cellularjs/di

You need to enable typescript decorator to use this package. Add experimentalDecorators, emitDecoratorMetadata to your tsconfig.json.

{  "compilerOptions": {    ...    "experimentalDecorators": true,    "emitDecoratorMetadata": true,    ...  }}