Class decorator that registers additional aliasing tokens for the decorated type.
The aliases are added using ExistingProvider(s) when the class is first registered in the container.
Example:
@Injectable(Weapon)
class Rifle {}
Note that @Injectable decorators can be stacked to add multiple aliases.
Example:
@Injectable(Weapon)
@Injectable(Gun) // Or just @Injectable(Weapon, Gun)
class Rifle {}
Class decorator that registers additional aliasing tokens for the decorated type.
The aliases are added using ExistingProvider(s) when the class is first registered in the container.
Example:
@Injectable(Weapon)
class Rifle {}
Note that @Injectable decorators can be stacked to add multiple aliases.
Example:
@Injectable(Weapon)
@Injectable(Gun) // Or just @Injectable(Weapon, Gun)
class Rifle {}
Class decorator that registers additional aliasing tokens for the decorated type.
The aliases are added using ExistingProvider(s) when the class is first registered in the container.
Example:
@Injectable(Weapon)
class Rifle {}
Note that @Injectable decorators can be stacked to add multiple aliases.
Example:
@Injectable(Weapon)
@Injectable(Gun) // Or just @Injectable(Weapon, Gun)
class Rifle {}
Class decorator that registers additional aliasing tokens for the decorated type.
The aliases are added using ExistingProvider(s) when the class is first registered in the container.
Example:
@Injectable(Weapon)
class Rifle {}
Note that @Injectable decorators can be stacked to add multiple aliases.
Example:
@Injectable(Weapon)
@Injectable(Gun) // Or just @Injectable(Weapon, Gun)
class Rifle {}
Class decorator that registers additional aliasing tokens for the decorated type.
The aliases are added using ExistingProvider(s) when the class is first registered in the container.
Example:
@Injectable(Weapon)
class Rifle {}
Note that @Injectable decorators can be stacked to add multiple aliases.
Example:
@Injectable(Weapon)
@Injectable(Gun) // Or just @Injectable(Weapon, Gun)
class Rifle {}
Class decorator that registers an additional aliasing token for the decorated type.
The alias is added using an ExistingProvider when the class is first registered in the container.
This overload allows referencing tokens that are declared later in the file by using the tokenRef helper function.
Example:
@Injectable(tokenRef(() => Weapon)) // Weapon is declared after Rifle
class Rifle {}
// Other code...
const Weapon = createType("Weapon");
Note that @Injectable decorators can be stacked to add multiple aliases.
Example:
@Injectable(tokenRef(() => Weapon))
@Injectable(Gun)
class Rifle {}
Class decorator that registers additional aliasing tokens for the decorated type.
The aliases are added using ExistingProvider(s) when the class is first registered in the container.
Example:
Note that
@Injectabledecorators can be stacked to add multiple aliases.Example: