腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
1
回答
没有检测到角中的
404
如果我的API返回
404
状态代码,我会尝试重定向到一个页面。我试图以以下方式捕获错误,如果是
404
,则推送到另一个页面。this.profileService.getProfile(res.json().id) if(res.status ===
404
浏览 2
提问于2018-04-22
得票数 0
回答已采纳
1
回答
在角js中显示自定义错误页
、
、
我可以尝试在角js中创建自定义错误页,这意味着当
404
错误发生时,显示
404
.html页,当发生500错误时,显示500.html页面,所以请告诉我如何使它..?
浏览 0
提问于2018-06-27
得票数 0
回答已采纳
1
回答
Angular
-
404
HTTP
拦截器
、
每当我的节点服务器返回
404
错误时,我希望它被我的
Angular
应用程序拦截,并将用户定向到特定的路由。 和代码: //Ignore thismyErrorInterceptor($window, $location) { reque
浏览 28
提问于2017-01-31
得票数 1
1
回答
检测角2中的服务器连接错误(
404
状态)
当后端服务器( Web )关闭时,我试图使用
http
.get访问此服务器上的一个方法,我希望得到一个带有
404
状态的响应,或者某种类型的连接错误。displayed to the user登录服务 return this.
http
.get
浏览 5
提问于2017-08-27
得票数 1
回答已采纳
1
回答
单元测试map.catch
angular
4服务
、
_
http
.get('
http
//localhost:8080/new').map((response : Response) => response.json())).catch(this.serverError
浏览 2
提问于2017-12-14
得票数 0
1
回答
未找到Angularjs partial
我只是想知道,如果没有找到请求的视图/部分(
HTTP
404
),如何向用户显示消息。目前,
angular
启动了请求,并得到了包含error-html的
404
响应,但用户没有看到网站有任何变化。
浏览 0
提问于2014-01-11
得票数 0
1
回答
角度:拦截
HTTP
错误并继续链接
、
我希望将某些
HTTP
错误代码视为非错误,并正常处理它们的响应.因此,我尝试添加一个HttpInterceptor来捕获500个状态代码,并返回原始响应(在error.error中放置角): return throwError('server error'); }) }this.
http
.get(...).pipe( tap(co
浏览 0
提问于2020-04-17
得票数 3
回答已采纳
4
回答
500个服务器错误的角度句柄
、
如何修改我的
http
调用来处理(捕获) 500个服务器错误。我尝试调用API,但在函数的'err‘部分收到'500 (Internal server Error)’。call_
http
() { this.result = data;
浏览 0
提问于2018-10-02
得票数 7
1
回答
Angular
11:单元测试HttpInterceptor -无法让catchError在测试中工作
、
、
、
拦截器
作为全局错误处理程序工作,只是在catchError(httpResponseError)上触发。
拦截器
在我的站点上工作得很好,但我无法获得单元测试来实际测试代码。下面是
拦截器
的代码:import { Injectable } from &
浏览 14
提问于2021-03-08
得票数 0
回答已采纳
1
回答
单元测试
Angular
HTTP
拦截器
、
、
、
我有一个标准的
HTTP
拦截器
作为工厂: .module('app.services') function responseError(rejection) { if (
angular
.isDefined} }
浏览 11
提问于2016-09-14
得票数 0
回答已采纳
2
回答
(角)拦截HttpResponse误差并继续观测
、
、
filterBy": { "value": searchTerm } return this.
http
.post(this.itemApiUrl, searchItem, { headers: this.headers });这是
拦截器
:export class HttpErrorInterceptorI DON'T want to t
浏览 3
提问于2022-01-11
得票数 3
回答已采纳
1
回答
当JWT令牌到期时,
Angular
2将用户重定向到某个位置,并且他目前处于受保护的位置。
我使用的是来自auth0的
angular
2-jwt包。一切正常工作,但现在我想知道如何重定向用户,谁目前在某些路径,这是与我的奥斯守卫,在其他地方。现在,当用户试图到达受保护的路径时,它正在重定向。
浏览 2
提问于2017-02-19
得票数 5
回答已采纳
1
回答
在使用$
http
拦截器
修改请求url时,ng-grid不会加载标题行模板。
、
我们的应用程序使用$
http
拦截器
向$
http
请求添加令牌作为一种安全形式,
拦截器
添加的令牌每5分钟左右更新一次。我们现在想要使用ng-grid。但是,$
http
拦截器
使得ng-grid不会加载它为标题行使用的模板,这将导致标题行不呈现。$
http
.get请求被
拦截器
拦截,该
拦截器
在有机会使用url查询$templateCache模板之前将安全令牌添加到url。securityToken=123456 结果是$templateCach
浏览 0
提问于2014-01-14
得票数 1
1
回答
Angular
404
使用远程验证进行处理
、
我有一个通过
拦截器
处理
404
的
angular
应用程序。具体地说: .provider('AppInterceptor', function() { } } };然后,我使用以下命令来监听此事件:
angular
.module$on('notF
浏览 1
提问于2015-06-23
得票数 1
4
回答
角4.3中的HttpInterceptor :拦截400个错误响应
、
这是我的
拦截器
import { Injectable } from '@
angular
/core'; import { HttpInterceptor, HttpHandler, HttpRequest, HttpEvent, HttpResponse, HttpErrorResponse } from '@
angular
浏览 6
提问于2017-07-28
得票数 20
回答已采纳
1
回答
允许GET请求的请求
、
、
、
extends ResourceServerConfigurerAdapter { public void configure(final HttpSecurity
http
) throws Exception
http
.authorizeRequests() {
浏览 34
提问于2021-07-08
得票数 0
1
回答
角Rest头呼叫问题
、
、
headers.append('authentication', `${student.token}`); return this.
http
浏览 6
提问于2017-09-25
得票数 0
回答已采纳
1
回答
角7给出this.interceptor是未定义的误差
、
、
我试图在
angular
7中实现一个this.interceptor,但是它提供了"this.interceptor是未定义的“错误。原因是什么?auth.service.ts -我在那里打
http
电话export class AuthService{ bootstrap: [AppComponent] export class AppModule
浏览 1
提问于2019-08-02
得票数 1
回答已采纳
1
回答
当组件调用多个API时,仅调用一次
拦截器
我在单个组件中有多个API,其中在令牌过期时
拦截器
运行多次,例如,如果我在单个组件中有4个GET API,则
拦截器
将在令牌过期时运行4次my.httpInterceptor.ts ToastOptionsimport {} from "@
angular
/router"; _throw }/common/
http
"
浏览 0
提问于2018-10-31
得票数 3
1
回答
找不到mudule @
angular
/common/
http
(不使用SystemJs)
、
、
visual Studio2017项目mean
angular
提供客户端应用程序,asp.net核心mvc提供后台服务。我正在尝试创建一个
http
拦截器
,但在TypeScript加载模块时遇到了问题。,} from '@
angular
/common/
http
'; import/animations
浏览 2
提问于2017-10-06
得票数 0
回答已采纳
点击加载更多
热门
标签
更多标签
云服务器
ICP备案
对象存储
实时音视频
云直播
活动推荐
运营活动
广告
关闭
领券