如果我在模块中将服务声明为提供者但没有在服务中使用 @Injectable 装饰器,会发生什么?
//Module
module({
controller: [catController],
provider: [catService]
})
//Service
//@Injectable()
export class catService{
}
我认为令牌将被注册但不会被使用,并且每次都会共享新实例。我对么?
如果我在模块中将服务声明为提供者但没有在服务中使用 @Injectable 装饰器,会发生什么?
//Module
module({
controller: [catController],
provider: [catService]
})
//Service
//@Injectable()
export class catService{
}
我认为令牌将被注册但不会被使用,并且每次都会共享新实例。我对么?