Viewing File: /usr/local/cpanel/3rdparty/share/angular-ui-scroll/1.6.1/demo/topVisible/topVisible.html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Top visible</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.1/angular.js"></script>
<script src="../../dist/ui-scroll.js"></script>
<script src="topVisible.js"></script>
<link rel="stylesheet" href="../css/style.css" type="text/css"/>
</head>
<body ng-app="application">
<div class="cont cont-global">
<a class="back" href="../index.html">browse other examples</a>
<h1 class="page-header page-header-exapmle">Top visible</h1>
<div class="description">
There is an optional parameter of ui-scroll directive which gives us a reference to the item currently in the topmost visible position.
<div class="code">
<pre><li ui-scroll="item in datasource" top-visible="topItem">*{{item}<!---->}*</li></pre>
</div>
We recommend to use <i>topVisible</i> property on <i>adapter</i>.
Please follow <a href="topVisibleAdapter.html">this demo</a>.
</div>
<div class="info">
<div class="info-item"><span class="info-item-label">top visible:</span> {{topVisible}}</div>
</div>
<div class="viewport" id="viewport-persistentScroll" ui-scroll-viewport>
<div class="item" ui-scroll="item in datasource" buffer-size="40" top-visible="topVisible">{{$index}}: {{item}}</div>
</div>
</div>
</body>
</html>
Back to Directory
File Manager