-
Notifications
You must be signed in to change notification settings - Fork 5
Configuration
Thiago Teixeira edited this page Jan 14, 2019
·
3 revisions
Odin can be configured to use a Strict mode validation for its dependencies.
This configuration can be done through the OdinConfig
decorator, as shown in the following example.
import { OdinConfig } from '@philips/odin';
@OdinConfig({ strict: true })
class OdinBootstrap {
}
The strict
parameter indicates whether Odin must be case sensitive towards dependency names. It means that a name could be repeated when used with a different case, see below.
@Injectable
class CrazyPotato {
}
@Injectable
class CrAzYPotato {
}
@Injectable
class AnotherPotato {
@Inject('CrazyPotato')
crazyPotato1;
@Inject('CrAzYPotato')
crazyPotato2;
}