Ionic Alphabetical List
How do I make an ionic alphabetical list?
[WIP] Ionic Alphabetical List Test. What is a ionic alphabetical list? How do you make a ionic alphabetical list? This script and codes were developed by Dzulfikar Adi Putra on 06 September 2022, Tuesday.
Ionic Alphabetical List - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Ionic Alphabetical List</title> <link rel='stylesheet prefetch' href='https://code.ionicframework.com/1.1.1/css/ionic.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <head>
</head>
<body ng-app="starter" no-scroll> <ion-pane ng-controller="HomeController"> <ion-header-bar class="bar-stable"> <h1 class="title">Ionic Blank Starter</h1> </ion-header-bar> <ul id="alphabets"> <li ng-repeat="letter in alphabets"><a ng-click="goTo('{{letter}}')" href="#{{letter}}">{{ letter }}</a></li> </ul> <ion-content class="has-header content" delegate-handle="content"> <ion-list> <ion-item ng-repeat="person in persons"> <span ng-if="person.index" id="{{person.index}}">{{ person.name }} - {{person.age}} - {{person.index}}</span> <span ng-if="!person.index">{{ person.name }} - {{person.age}}</span> </ion-item> </ion-list> </ion-content> </ion-pane>
</body> <script src='https://code.ionicframework.com/1.1.1/js/ionic.bundle.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/chance/0.5.6/chance.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Ionic Alphabetical List - Script Codes CSS Codes
#alphabets{ position: fixed; top:0; right:0; height:100%; z-index:11; width: 50px; background: #eaeaea; padding: 10px 20px; line-height:24px;
}
/* ------------------------------- */
.ion_alpha_list_outer .list{ padding-right: 15px;
}
.ion_alpha_list_outer .item{ border-right: none;
}
.ion_alpha_sidebar{ position: fixed; right: 0; top: 0; height: 100%;
}
.ion_alpha_sidebar li{ line-height: 1.1;
}
Ionic Alphabetical List - Script Codes JS Codes
// Ionic Starter App
// credit : http://www.saintsatplay.com/blog/2015/02/scrolling-to-a-page-anchor-in-ionic-framework#.Vmf-RbiGRBc
// angular.module is a global place for creating, registering and retrieving Angular modules
// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)
// the 2nd parameter is an array of 'requires'
angular.module('starter', ['ionic'])
.controller('HomeController', function($scope, $location, $anchorScroll, $ionicScrollDelegate){ $scope.alphabets = []; $scope.persons = []; for(var i=65; i<=90; i++){ $scope.alphabets.push(String.fromCharCode(i)); } for(var i=0; i<100; i++){ $scope.persons.push({ name: chance.name(), age: chance.age() }); } $scope.persons = _.sortBy($scope.persons, 'name'); var temp = null; var oldTemp = null; $scope.persons.forEach(function(val, key){ temp = val.name.substring(0,1); if(oldTemp != temp){ oldTemp = temp; val.index = temp; } }); $scope.goTo = function(letter){ window.location.hash = letter; //$ionicScrollDelegate.anchorScroll(true); var handle = $ionicScrollDelegate.$getByHandle('content'); handle.anchorScroll(); window.location.hash = 'a'; }
})
.run(function($ionicPlatform) { $ionicPlatform.ready(function() { // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard // for form inputs). // The reason we default this to hidden is that native apps don't usually show an accessory bar, at // least on iOS. It's a dead giveaway that an app is using a Web View. However, it's sometimes // useful especially with forms, though we would prefer giving the user a little more room // to interact with the app. if (window.cordova && window.cordova.plugins.Keyboard) { cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true); cordova.plugins.Keyboard.disableScroll(true); } if (window.StatusBar) { // Set the statusbar to use the default style, tweak this to // remove the status bar on iOS or change it to use white instead of dark colors. StatusBar.styleDefault(); } });
});
Developer | Dzulfikar Adi Putra |
Username | superpikar |
Uploaded | September 06, 2022 |
Rating | 3 |
Size | 3,136 Kb |
Views | 66,792 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
D3JS Simple JSON SVG barchart vertical | 2,234 Kb |
Ionic - Wordpress REST API starter | 2,961 Kb |
JS Tree Example JSON Data | 2,435 Kb |
Force Layout Directed Graph using dot engine dagre-d3js library, data from JSON | 6,536 Kb |
Bulma breadcrumbs | 1,895 Kb |
D3JS Simple JSON SVG barchart vertical with Axis | 2,699 Kb |
SVG Animation Follow Path - d3js | 3,068 Kb |
Force Layout JSON Directed Graph using Dot Engine 2, nodes using array of object | 3,127 Kb |
Play and Pause Bootstrap 3 Button | 2,255 Kb |
Ionic tabs in the middle of the screen | 3,727 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
LDE old privacy page | Jasonangle | 2,339 Kb |
A Pen by James Podles | Jpod | 2,656 Kb |
Animated rainbow wave on canvas | Icodeforlove | 2,777 Kb |
Filter inputs | Rowinf | 1,721 Kb |
Social buttons | Flacu | 2,022 Kb |
Masonry | Uriuriuriu | 5,005 Kb |
CSS Variables | Jdsteinbach | 4,759 Kb |
A Pen by John Malc | F789gh | 1,420 Kb |
Kut D3 | Jellevrswk | 3,687 Kb |
Michelle, submit your photography to Unsplash. | Zaneriley | 3,368 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!