Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/416.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/86.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Angular无法在模式中向上滚动_Javascript_Jquery_Html_Angularjs_Angular - Fatal编程技术网

Javascript Angular无法在模式中向上滚动

Javascript Angular无法在模式中向上滚动,javascript,jquery,html,angularjs,angular,Javascript,Jquery,Html,Angularjs,Angular,我的Angular项目中有以下表单(我将jquery导入添加到ts文件): 有什么我应该为你做的吗 是否有其他人对此问题有经验???是否有其他人对此问题有经验??? <style> body .ui-dialog .ui-dialog-content { overflow-y:scroll; /* I made the scrollbar of modal visible */ } </style> <div id="createF

我的Angular项目中有以下表单(我将jquery导入添加到ts文件):


有什么我应该为你做的吗

是否有其他人对此问题有经验???是否有其他人对此问题有经验???
<style>
    body .ui-dialog .ui-dialog-content {
        overflow-y:scroll; /* I made the scrollbar of modal visible */
    }
</style>

<div id="createForm" class="ui-g-12">
    <div class="ui-g form-group p-justify-between">
        <!-- other stuff -->
    </div>
</div>
scrollTop() {
    //when I use this it works but scroll the body behind the popup instead of popup
    $('html, body').animate({ scrollTop: $(document).height() }, 'slow');

    //this does not work
    $('html, body').animate({ scrollTop: $('#createForm').offset().top }, 'slow');
}