如何在 angular 组件完成渲染后触发 document.ready 事件

How to trigger document.ready event affter angular component finish render

我需要在组件内部从 angular 触发 document.ready 事件。我需要这个,因为外部 firefox/chrome 扩展仅 运行 当文档就绪事件被触发时。

更多细节。在我的组件内部,我将元素元标记添加到页面的头部。我有一个 firefox/chrome 扩展,只有在 document.redy 事件被触发时才读取这个元数据

我用这段代码触发了一个事件。

document.dispatchEvent(new Event('ZoteroItemUpdated', {
            bubbles: true,
            cancelable: true
        }));

现在,当我更新页面头部的元标记时,Zotero 插件会刷新