腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
3
回答
向
HttpInterceptor
添加
debounceTime
我已经在我的angular项目中
添加
了一个http错误拦截器。我尝试
添加
一个
debounceTime
: return next.handle(request)catchError((error: HttpErrorResponse
浏览 4
提问于2020-10-08
得票数 0
回答已采纳
2
回答
等待一段时间后显示微调器
、
因此,我实现了以下拦截器:import {Observable} from 'rxjs'; export class LoadingInterceptor implements
HttpInterceptor
浏览 0
提问于2018-07-31
得票数 2
1
回答
RxJs条件去反弹和采样
、
、
基于来自其他流的值
向
流
添加
有条件的去抖动时间const animation$ = new BehaviorSubject(false).asObservable;configuration$.pipe(
debounceTime
(CONSTANTS.DEBOUNCE),sample(interval(CONSTANTS.SAMPLE))); configuration.subscribe(data=>
浏览 1
提问于2019-04-01
得票数 1
2
回答
如果1秒内没有响应,如何
添加
到数组?
、
、
、
只有当请求超过1秒时,我才尝试运行spinner:export class LoadingInterceptor implements
HttpInterceptor
{this.spinnerService.isLoading.next(this.requests.length > 0);} constructor() { .pipe(
debounceTime
this.loadingStop)) .subscribe((status
浏览 6
提问于2020-04-28
得票数 0
回答已采纳
1
回答
rxjs可观察到的
debounceTime
内部下一步被忽略
、
、
debounceTime
似乎忽略了对其subjects next方法的内部调用: tap((a) => console.log("tab:" + a)), ).subscribe((a) => {}); s
浏览 0
提问于2018-04-24
得票数 3
回答已采纳
1
回答
App module.ts Angular文件中的这三行是什么意思
这是一个Angular appmodule.ts文件import { BrowserModule } from '@angular/platform-browser';import { UploadComponent } from './upload.component'; import { U
浏览 0
提问于2020-03-18
得票数 1
1
回答
形状ValueChanges中的角去跳
、
、
、
我知道为了延迟时间,这样不是每个字符都会触发一个新的筛选器,我需要使用减法,但我不知道该在哪里
添加
它。它应该在值更改订阅中吗?另外,实现它的正确方法是什么?
浏览 3
提问于2020-10-16
得票数 1
回答已采纳
2
回答
仅对具有Angular
HttpInterceptor
的长时间请求显示微调器
、
、
我创建了一个拦截器,以便在发出HTTP请求时显示微调器: import { HttpEvent, HttpHandler,
HttpInterceptor
, HttpRequest } from '@import { finalize } from 'rxjs/operators'; export class SpinnerInterceptor implements
HttpInterceptor
我一直在尝试使用
debounceTime
,但我不确定如何使用它,也不知道它
浏览 12
提问于2019-09-16
得票数 2
回答已采纳
1
回答
Angular5
添加
jwt令牌
、
我制作了如下所示的拦截器类:import {HttpEvent, HttpHandler,
HttpInterceptor
import {Observable} from "rxjs/Observable"; export class AuthInterceptor implements
HttpInterceptor
console.log('daniel5');
浏览 0
提问于2018-06-15
得票数 0
回答已采纳
3
回答
如果术语为空,则禁用实时搜索-角度2
、
、
、
results搜索服务:return terms.
debounceTime
浏览 5
提问于2017-12-21
得票数 1
回答已采纳
1
回答
扩展HTTP -当返回未经授权时重定向
、
、
return Observable.throw(err); }); };import {
HttpInterceptor
} from '../api/api/
HttpInterceptor
'; import { RequestOptions, ConnectionBackend}
浏览 3
提问于2016-09-15
得票数 1
回答已采纳
4
回答
如何使用
debounceTime
,但在一定时间后仍然触发函数?
、
、
只有在300毫秒没有被调用的情况下,我才想使用
debounceTime
来执行函数。同时,如果这个过程需要很长的时间,我也希望每1分钟触发一次函数。否则,该函数将只在进程结束时触发。基本上,我们的系统有一个很长的过程,它会
向
客户端发送大量的SignalR更新。当我在客户机上接收到服务器命令时,我将
向
服务器发出2个额外的HTTP请求,以获取一些信息。如果两个命令之间的时间在300 is以内,我将使用
debounceTime
来防止
向
服务器发送太多的请求。但是有一种情况是,服务器经常在1小时内将更新发送到客户端。
浏览 8
提问于2017-10-17
得票数 6
回答已采纳
2
回答
当旋转器以角显示时,禁用对整个页面的单击。
、
、
、
、
当点击旋转器时,我无法在页面上的任何地方禁用鼠标单击。这是具有角度的组件的层次结构。内容包装器中有一些子组件应该能够调用spinnner服务。 numberOfTasks: 0; spinnerState: Observable<any>; const sp
浏览 1
提问于2019-03-10
得票数 1
1
回答
如何仅在角6拦截器中将请求标头
添加
到特定域
、
我的应用程序需要调用多个域url,其中一个是主服务器url,它需要
添加
授权头,而其他url不需要
添加
标头。import {HttpEvent, HttpHandler,
HttpInterceptor
, HttpRequest} from '@angular/commonimport {Injectable} from '@angular/core'; @Injec
浏览 2
提问于2018-09-07
得票数 2
回答已采纳
1
回答
向
Angular
HttpInterceptor
添加
Auth0承载令牌
、
我正在编写一个
HttpInterceptor
,它将
向
传出请求
添加
一个持有者令牌。通过调用getAccessTokenSilently方法获取的承载token。from '@auth0/auth0-angular'; @Injectable() export class AuthHttpInterceptor implements
HttpInterceptor
浏览 10
提问于2021-01-08
得票数 0
1
回答
在使用全局HTTP拦截器作为Angular中的错误处理程序时,如何识别哪个组件/服务抛出了错误?
、
、
我正在使用一个
HTTPInterceptor
来处理发生在Angular app.Once中的任何错误一个错误发生了,它被抛出并由这个拦截器处理。但是,一旦
向
拦截器抛出了错误,我希望确定是哪个组件或服务抛出了该错误。如果main.service.ts是发生错误的服务,我希望在我的
HTTPInterceptor
类中获得名称‘main.service.ts’。
浏览 12
提问于2019-06-28
得票数 2
3
回答
在Angular HttpClient拦截器中使用promise
、
、
、
、
我可以在
HttpInterceptor
中使用promise吗?例如:this.someService.someFunction()@Injectable() constru
浏览 2
提问于2017-08-31
得票数 25
回答已采纳
1
回答
在角拦截器中获取当前路径
、
、
、
、
我想知道是否有一种方法可以以角度检索
HttpInterceptor
中的当前路由。我正在使用来自不同路由的相同的拦截器,但我需要检查拦截器是否是从特定的路由使用的。如果是这样的话,我想在后端请求执行之前
向
它
添加
一个特定的头。@Injectable() constructor(
浏览 3
提问于2019-11-15
得票数 8
回答已采纳
3
回答
没有正确追加Angular 5标题值
、
、
、
我正在angular服务请求中
添加
标题,但是值没有正确
添加
,我创建了一个拦截器来
添加
标题,如下所示export class AddHeaderInterceptor implements
HttpInterceptor
{ intercept(req: HttpRequest<any>, next: HttpHandler): Observablerequest instead of the original request to the n
浏览 0
提问于2019-04-01
得票数 0
2
回答
在Angualr和RxJS中,有什么正确的方法可以在表单更改后立即做一些事情呢?
、
、
、
、
在组件中有一个表单,当它的值发生变化时,它应该做两件事:父组件中的服务将在表单值更改时
向
API发送新请求。不幸的是,我现在有两个订阅者:一个处理视图更新,另一个使用
debounceTime
处理EventEmitter this.form.valueChanges.pipethis.isDestroyed$) this.updateView();
浏览 7
提问于2020-06-15
得票数 1
回答已采纳
点击加载更多
热门
标签
更多标签
云服务器
ICP备案
对象存储
云点播
云直播
活动推荐
运营活动
广告
关闭
领券