首页 > 解决方案 > Angular 应用程序中的 KeepAlive 是什么?

问题描述

这个问题听起来很简单,但网上似乎没有太多解释。我正在尝试实现 ngIdle,并遵循了互联网上的一些指南,他们在实现中包括了 keepAlive。但它并没有真正解释 keepAlive 在那里做什么。

setIdle(5) // this fire up the timeout notification modal after 5 seconds
setTimeout(5) // this creates a timer that lasts for 5 seconds after the notification modal is shown
keepalive.interval(15) // what is it doing there and what is the impact on the angular application?

到目前为止,当我在网上阅读时,大部分keepAlive解释都与TCP连接以及它如何处理这些连接/线程有关。但是在角度应用的背景下呢?

欣赏是否可以对此提供一些基本解释。谢谢。

标签: angularkeep-aliveng-idle

解决方案


推荐阅读