Angular 是否有任何功能可以在第一个突出显示的搜索文本上自动滚动查找?

Angular 是否有任何功能可以在第一个突出显示的搜索文本上自动滚动查找?,angular,typescript,Angular,Typescript,我使用了MatDialog弹出窗口,并在按钮上单击我编写此代码: $(document.getElementById('se')).html($(document.getElementById('se')).html() .replace('aman should be', "<span class='highlight'>"+'aman should be'+" </span>")); $(window).scrollTop($

我使用了MatDialog弹出窗口,并在
按钮上单击我编写此代码:

 $(document.getElementById('se')).html($(document.getElementById('se')).html()
.replace('aman should be', "<span class='highlight'>"+'aman should be'+" </span>")); $(window).scrollTop($('.highlight:first').position().top)
$(document.getElementById('se')).html($(document.getElementById('se')).html()
.replace('aman应该是',“+”aman应该是“+”)$(窗口).scrollTop($('.highlight:first').position().top)
它高亮显示单词,但不改变滚动位置