腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
2
回答
Angular
10
-
什么
是
错误
:
R3InjectorError
(
AppModule
)[
Window
->
Window
->
Window
]
angular
、
angular10
我正在尝试通过一个可以注入的服务来访问
Angular
中的窗口对象。import { Injectable } from '@
angular
/core'; return
window
;} 我试图创建一个可注入的服务,并尝试将其包含在App Module中,但似乎出现了一些
错误
。/_windowRef.service'; 然后 providers: [WindowRef
浏览 38
提问于2020-09-04
得票数 1
1
回答
角9测试
错误
NullInjectorError:没有窗口提供程序
angular
、
karma-jasmine
在这篇文章的一半时间里,我遵循了Jeff的建议:
window
.d.ts声明全局{接口窗口{ propName: MyInterface } 当我运行测试时,我不会收到这个
错误
。NullInjectorError:
R3InjectorError
(DynamicTestModule)[AdvancedsearchService -> AuthService
浏览 0
提问于2021-01-19
得票数 1
回答已采纳
2
回答
仅在初始载荷下角应用程序的误差
angular
、
stackblitz
我正在StackBlitz上编写一个样板角应用程序,在初始加载时会出现一个
错误
,但是当我在编辑器中做任何更改时,这个应用程序会很好地加载。/turbo_modules/@
angular
/compiler@6.0.7/bundles/compiler.umd.js中的
错误
(301:17)不能解析MainComponent:(?)评估main.ts引导应用程序 this.activeLink = '
浏览 0
提问于2018-07-10
得票数 0
回答已采纳
18
回答
如何将窗口注入到服务中?
angular
、
typescript
、
dependency-injection
我正在用将使用localstorage的TypeScript编写一个
Angular
2服务。我想将浏览器
window
对象的引用注入到我的服务中,因为我不想引用任何全局变量,比如
Angular
1.x $
window
。 我该怎么做?
浏览 159
提问于2015-12-09
得票数 124
1
回答
Angular
4:测试是否调用了
window
.location.href
angular
、
testing
import { Injectable } from '@
angular
/core'; }我想知道会话不存在时是否调用了
window
.location.href。以下
是
我到目前为止所做的: import { TestBed, async, inject } from '@
angular</e
浏览 0
提问于2017-07-03
得票数 5
1
回答
没有OktaAuth的提供者,但OktaAuth定义?
angular
、
typescript
、
jhipster
、
okta
所以,我已经实现了OktaAuthModule,但是我总是有这样的
错误
: NullInjectorError: No provider forNullInjectorError:
R3InjectorError
(
AppModule
)
浏览 11
提问于2021-12-26
得票数 2
回答已采纳
1
回答
AngularJS控制器测试失败与RequireJS
angularjs
、
requirejs
、
jasmine
、
karma-runner
我的茉莉花测试(使用业力)抛出
错误
:参数'salesListController‘不是函数,而是未定义的 if (
window
./
angular
-mocks', '
appModule
': '/base/app/scr
浏览 3
提问于2013-08-09
得票数 2
回答已采纳
7
回答
获取
Angular
2中服务的域名
angular
我需要向同一个服务器发出请求,另一个端口上的REST API。
浏览 94
提问于2016-03-25
得票数 57
回答已采纳
1
回答
angular
6中web工作者的角webpack配置
angular
、
webpack
、
angular-cli
、
angular6
、
web-worker
/node_modules/@
angular
/platform-webworker-dynamic';(<
浏览 0
提问于2018-08-14
得票数 0
回答已采纳
2
回答
Angularjs $interval返回fn不是函数
javascript
、
angularjs
此调用定期引发
错误
:> at callback (
angular
.js:12516)> at Scope.$digest (
angular
.js:17257)> at tick (
angular
.
浏览 5
提问于2016-07-20
得票数 7
回答已采纳
1
回答
角度依赖,为
什么
会有两种不同的方式?
angularjs
、
dependency-injection
我刚刚开始学习AngularJS,我不确定为
什么
我总是看到下面两种不同的方式。只有第一种方法对我有效,如果我尝试第二种方法,依赖项就不起作用。有
什么
不同,哪一个
是
正确的?var app =
angular
.module('MainCtrl', []); app.controller('MainController',['$scope','$cookies
浏览 0
提问于2018-03-09
得票数 1
1
回答
上传到蔚蓝blob存储- this.blobStorage.createBlobServiceWithSas不是一个函数
angular
、
azure-blob-storage
、
angular7
但是我现在得到了
错误
教程中的
AppModule
.ts{}export function azureBlobStorageFactory(): IBlobStorage { return
window
['AzureStorage此时,我在控制台中运行
window
['A
浏览 2
提问于2019-03-05
得票数 0
回答已采纳
1
回答
如何对调用
window
.location.href的
Angular
2函数进行单元测试
unit-testing
、
angular
、
jasmine
、
window.location
this.userService.setSessionAndDateOnlogin(); .subscribe( } }) ); 当我运
浏览 1
提问于2016-07-22
得票数 7
1
回答
错误
错误
:未知(承诺):
错误
: StaticInjectorError(
AppModule
)
typescript
、
angular5
我有以下代码:export class ClientCacheService {_cacheMode === CacheMode.SessionStorage)
window
.sessionStorage.setItem(`${prefix}_${key}`:未知(承诺):
错误
: StaticInjectorError(
AppModule
)Client
浏览 1
提问于2018-07-10
得票数 1
回答已采纳
2
回答
为
什么
弗罗拉编辑器不出现?
angular
、
froala
我在我的
angular
2项目中包含了froala编辑器,它似乎没有出现在屏幕上,也没有出现
错误
。FroalaViewModule.forRoot() providers: [SortPipe], })import {
AppModule
} from './environ
浏览 5
提问于2017-07-28
得票数 0
5
回答
Angular
2 (TypeScript)中的单元测试/模拟窗口属性
unit-testing
、
typescript
、
angular
、
phantomjs
、
karma-jasmine
我正在为
Angular
2中的一个服务构建一些单元测试。在我的服务中,我有以下代码:但是,当我运行包含此代码的测试时,它将失败。使用
Window
的所有功能
是
很棒的,但由于我使用的
是
PhantomJs,我认为这是不可能的(我也尝试了Chrome,它产生了同样的结果)。在AngularJs中,我会求助于模拟$
Window
(或者至少
是
有问题的属性),但是由于没有太多关于
浏览 3
提问于2016-04-12
得票数 24
1
回答
Angular
4 office外接程序加载耗时较长
angular
、
webpack
、
office-js
问题
是
,大多数时候Word被挂起,或者加载应用程序花费了太多时间。请帮助我解决此问题。'; enableP
浏览 13
提问于2017-08-22
得票数 0
2
回答
角模型不绑定数据
angularjs
为
什么
我不能在以下代码中使用$scope从ng-model中获得值:var
appModule
=
angular
.module('publicApp',[]); );}); <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.
浏览 2
提问于2016-02-17
得票数 1
回答已采纳
1
回答
在复杂的cshtml应用程序中查找加载角
angularjs
我的故障排除:从主菜单,应用程序流到一个‘问题’模块,角确实得到加载:然后
是
一些问卷调查屏幕,最后
是
“文档上传屏幕”,即感兴趣的屏幕。也没有控制台
错误
。"margin-top:30px;">I do看角仍然
是</e
浏览 2
提问于2017-04-06
得票数 0
2
回答
Angular
2通用服务器端呈现NgbTypeaheadWindow是否将其添加到@NgModule.entryComponents中
angular
、
webpack
、
angular5
、
angular2-directives
、
angular-universal
我遵循了这个指南:(我使用的
是
角版本5) ,最后,在呈现服务器和客户端之后,当我尝试点击节点dist/server.js失败时,弹出下面的msg:
错误
:意外指令‘C:/Users/benn/Documents/dev/
angular
_universal_without_e2e/client/node_modules/@ng-bootstrap/ng
浏览 1
提问于2018-02-18
得票数 0
回答已采纳
点击加载更多
热门
标签
更多标签
云服务器
ICP备案
对象存储
云点播
实时音视频
活动推荐
运营活动
广告
关闭
领券