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

Angular 如何在角度组件完成渲染后触发document.ready事件,angular,events,triggers,document-ready,Angular,Events,Triggers,Document Ready,我需要从组件内部的角度触发document.ready事件。我需要这个,因为外部firefox/chrome扩展只在触发document ready事件时运行 更多细节。在我的组件内部,我将元素元标记添加到页面的头部。我有一个firefox/chrome扩展,只有在触发document.redy事件时才读取此meta我使用此代码触发事件 document.dispatchEvent(new Event('ZoteroItemUpdated', { bubbles: tru

我需要从组件内部的角度触发document.ready事件。我需要这个,因为外部firefox/chrome扩展只在触发document ready事件时运行


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

我使用此代码触发事件

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

现在,当我更新页面头部的meta标记时,Zotero pluggin刷新了这个用例。我想你必须在服务器端呈现它。好的,呈现组件时会执行ngAfterViewInit,但我的问题是如何触发document.ready事件