即使页面已经加载,但在进入视图之前仍未加载Web内容

Web content not loading until it is brought into view even though the page loaded already

本文关键字:加载 视图 内容 Web      更新时间:2023-09-26

我是一个新的角度和创建一个网站。当我在移动设备上访问此页面http://metrotennis.com/raymond/#/usta/brooklyn时,尝试向下滚动页面,直到内容进入视图,内容才会加载。我使用的是ui-router

.config(['$stateProvider', '$urlRouterProvider',
    function ($stateProvider, $urlRouterProvider) {
        .state( 'usta', {
            url: '/usta',
            views: {
               "main": {
                   controller: 'usta',
                   templateUrl: 'templates/usta.html'
                },
            }
         })
         .state("manhattan", {
             parent: 'usta',
             url: '/manhattan',
             controller: 'manhattan',
             templateUrl: 'templates/manhattan.php'
          })
    }
])

所以我将这个div插入到父页面中以获取新文件:

<div ui-view></div>

请让我知道是否有什么我错过了,或者如果它只是因为我有一个沉重的页面。

谢谢!

我需要添加:

html{
    overflow-y: scroll!important;
    -webkit-overflow-scrolling: touch;
}