Just beginning with ionic , I can’t make a scrollbar for a simple list ?
I am working in Chrome and wan’t to be able to scroll thought simple lists of items
using the scroll bar.
Here is a codepen: http://codepen.io/kolodni/pen/zvOoRy
I also put the code here
<html ng-app="ionicApp">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title>Sign-in, Then Tabs Example</title>
<link href="http://code.ionicframework.com/0.9.24/css/ionic.min.css" rel="stylesheet">
<script src="http://code.ionicframework.com/0.9.24/js/ionic.bundle.min.js"></script>
</head>
<body ng-controller="EduCtrl" scroll="true">
<tabs tabs-style="tabs-icon-top" tabs-type="tabs-positive">
<tab title="Scroll" icon="ion-home">
<!-- <nav-view name="edu-tab"></nav-view> -->
<ion-content scroll="true" direction="y" scrollbar-y="true">
<ion-list>
<ion-item ng-repeat="edu in edus">
<div class="item item-divider">
<span>Institute</span>
{{edu.institute}}
</div>
<div class="item">
<span>Subject</span>
{{edu.subject}}
</div>
<div class="item">
<span>From</span>
{{edu.fromYear}}
</div>
<div class="item">
<span>To</span>
{{edu.toYear}}
</div>
</ion-item>
</ion-list>
</ion-content>
</tab>
<tab title="About" icon="ion-ios7-information" >
about tab
</tab>
</tabs>
</body>
</html>
angular.module('ionicApp', ['ionic'])
.config(function($stateProvider, $urlRouterProvider) {
})
.controller('EduCtrl', function($scope, $state) {
//alert('in EduCtrl');
$scope.edus = [
{institute: 'MIT', subject:'a', fromYear: 1993, toYear: 1999},
{institute: 'UCLM', subject:'b', fromYear: 2000, toYear: 2002},
{institute: 'Cambridge', subject:'c', fromYear: 2000, toYear: 2002},
{institute: 'NY', subject:'d', fromYear: 2000, toYear: 2002},
{institute: 'Orange', subject:'e', fromYear: 2000, toYear: 2002},
{institute: 'Orange', subject:'e', fromYear: 2000, toYear: 2002},
{institute: 'Orange', subject:'e', fromYear: 2000, toYear: 2002},
{institute: 'Orange', subject:'e', fromYear: 2000, toYear: 2002},
{institute: 'Orange', subject:'e', fromYear: 2000, toYear: 2002},
{institute: 'Banana', subject:'f', fromYear: 2004, toYear: 2011}
];
})
;
thanks.