腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(9999+)
视频
沙龙
1
回答
在全局对象中使用了NestJS @
Injectable
:使用'new
injectable
‘还是'app.use(
injectable
)'?
nestjs
因为NestJS允许注入,所以我想确保我写的代码是最有效的。 我使用一个全局拦截器来包装我的应用程序响应,并使用一个全局过滤器来处理异常。 //main.ts:app.useGlobalFilters(new ExceptionsFilter(app.get(LogService))); //filter/interceptor.ts: constructor(@Inject('LogService') privat
浏览 47
提问于2019-09-16
得票数 0
回答已采纳
1
回答
将@
Injectable
()注入另一个@
Injectable
()时出错
typescript
、
angular
are decorated with Inject or have valid type annotations and that 'ProductService' is decorated with
Injectable
1465996676355:426:22export class WidgetItemService { private widge
浏览 1
提问于2016-06-15
得票数 3
1
回答
@
Injectable
(根:‘providedIn’)的语义?
angular
、
typescript
、
progressive-web-apps
、
angular-providers
、
angular-dependency-injection
我只是想确保我理解了@
Injectable
(providedIn: 'root')的语义。在Angular 6中,不再需要将SomeNPModule导入到AppModule中,因为我们在服务本身上使用@
Injectable
(providedIn: 'root),并且当注释运行时,它会自动使服务在
浏览 19
提问于2018-08-24
得票数 5
回答已采纳
1
回答
Angular 2
Injectable
缺少对象
javascript
、
angular
、
typescript
、
ionic2
它看起来是这样的:export class Identity { public
浏览 9
提问于2017-07-29
得票数 0
回答已采纳
6
回答
带有@
Injectable
()的角9 BaseComponent
angular
、
angular9
在角8中,我能够使用"@
Injectable
“属性创建基本组件(实际组件继承的类)。
浏览 10
提问于2020-02-07
得票数 14
回答已采纳
3
回答
此错误意味着在运行创建的nestjs模块时出现了此错误。
javascript
、
node.js
、
nestjs
、
nest
import {
Injectable
} from "@nestjs/common"; export class UsersService{ return
浏览 4
提问于2021-10-21
得票数 0
回答已采纳
1
回答
使父对象中的属性对其包含的任何对象可见
c#-4.0
、
scope
、
parent-child
我有一个类CalculationManager,它由一个BackgroundWorker实例化,因此具有一个CancellationRequested属性。我需要做的是让这些类中的每一个在它们的Execute()方法的循环(它们彼此不同)中检查某个“全局”Cance
浏览 3
提问于2013-11-20
得票数 0
回答已采纳
2
回答
AGM: Angular Google Maps Import
Injectable
angular
我正在使用import { Component } from '@angular/core'; selector: 'ngx-gmaps', styleUrls: ['./gmaps.component.scss'], <nb-card> <nb-
浏览 0
提问于2018-03-22
得票数 1
2
回答
Angular2 -注入@
Injectable
javascript
、
typescript
、
angular
、
injectable
我的问题是,我的服务有一个@
Injectable
()装饰器,我不确定是否可以在元数据中传递一个provide数组,如本教程所示,在元数据中注入配置。任何遇到这样一个问题的人都欢迎分享他的解决方案:)
浏览 2
提问于2016-02-23
得票数 4
回答已采纳
1
回答
未明错误:不能解析ProductListComponent的所有参数?
typescript
、
service
、
angular6
this.products; } import { providedIn: 'root' getProducts(): IProduct
浏览 1
提问于2018-08-22
得票数 0
回答已采纳
1
回答
Angular 2-
Injectable
()装饰器
angular
、
dependency-injection
、
angular2-services
我并不完全理解Angular 2中的@
Injectable
装饰器,即使我不使用它,服务还是可以工作的。(请看下面的示例)使用@
Injectable
`export class AppService{ return "something"没有@
Injectable
exp
浏览 5
提问于2017-01-23
得票数 2
回答已采纳
2
回答
JMockit -如何注入抽象方法
java
、
mockito
、
testng
、
jmockit
测试 @Tested @
Injectable
@
Injectable
@
浏览 4
提问于2020-11-16
得票数 0
2
回答
角2误差TS1146:预期声明
angular
、
typescript
Exit status 2import {
Injectable
} from '@angular/core'; 如果有人能告诉我构建错误的原因
浏览 4
提问于2017-05-04
得票数 0
回答已采纳
1
回答
函数参数似乎在类型分析中消失了
haskell
、
functional-programming
class
Injectable
m t where injecteBool injecte = VLitteralM .ValeurM m • Could not deduce (
浏览 22
提问于2020-03-29
得票数 2
回答已采纳
2
回答
动态生成ActiveSupport的测试::关注点
ruby-on-rails
、
ruby
、
rspec
、
activesupport-concern
我有一个定义如下的问题: extend ActiveSupport::Concern def
injectable
_attributes(attributes) define_method "injected_#{atr这很好,但我在访问传递给
injectable
_attributes函数的参数时遇到了问题。目前,我在共享规范中这样做: shar
浏览 56
提问于2016-03-11
得票数 0
回答已采纳
3
回答
angular6 - provideIn @
Injectable
service
angular
我有一个包含test.module.ts test.component.ts test.service.ts的文件夹test,问题是我应该使用: 1)在服务中: @
Injectable
({ providedIn
浏览 4
提问于2018-05-14
得票数 0
3
回答
如何使用Angular5声明服务
javascript
、
angular
、
angular5
我有一个像这样的棱镜服务@Inject(ChromeDataService)export class MainDataService {
浏览 3
提问于2018-01-15
得票数 0
2
回答
类型不可分配给类型providedIn属性缺少ProvidedIn
angular
、
typescript
、
angular7
该服务将从某个url获取json数据: import {
Injectable
} from '@angular/core';export class ProductListService { getProduc
浏览 21
提问于2019-01-09
得票数 3
回答已采纳
1
回答
Jest 22缺少必需@
injectable
注解
annotations
、
jestjs
、
inversifyjs
只有当我从Jest 20升级到22时,我突然在一些测试中得到了这个错误: 下面有一行代码指向,这与错误没有任何关系。
浏览 1
提问于2019-09-18
得票数 1
2
回答
为什么@
Injectable
类上有NPE
jmockit
public class UserResourceTest { @
Injectable
UserService userService
浏览 4
提问于2014-10-31
得票数 1
回答已采纳
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
Angular 6发布,新功能详解
单元测试系列:Mock工具Jmockit使用介绍
NgRx 10引入组件本地状态管理包
如何从 0 到 1 搭建性能检测系统
Angular 9即将发布:改进Ivy编译和渲染管道
热门
标签
更多标签
云服务器
即时通信 IM
ICP备案
对象存储
实时音视频
活动推荐
运营活动
广告
关闭
领券