我在 pendo 中有一个指南设置,但我需要包含一个功能,当用户单击与目标 pendo 元素不同的元素时,该功能将继续指南。
我发现了这个功能:
module.exports = (function wireGuideAdvance(dom, step) {
if (!step) return;
var nextStep = guide.steps[guide.getPositionOfStep(step)];
var advanceOnce = pendo._.once(pendo.onGuideAdvanced);
function checkForElementAndAdvance(e) {
var checkForNextElement = setInterval(function () {
if (dom(nextStep.elementPathRule).length) {
advanceOnce();
clearInterval(checkForNextElement);
}
}, 1000);
}
pendo.attachEvent(document, 'click', checkForElementAndAdvance);
// step wrappable method to clear all event listeners
step.after('teardown', function () {
pendo.detachEvent(document, 'click', checkForElementAndAdvance);
});
})(pendo.dom, step);
但我不知道如何在 Angular 应用程序中使用它。