Collection repeat and navigation
How do I make an collection repeat and navigation?
A barebones starter template for Ionic development. What is a collection repeat and navigation? How do you make a collection repeat and navigation? This script and codes were developed by Mike Hartington on 21 September 2022, Wednesday.
Collection repeat and navigation - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>collection repeat and navigation</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <html ng-app="ionicApp"> <head> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"> <title>Ionic Template</title> <link href="https://code.ionicframework.com/nightly/css/ionic.css" rel="stylesheet"> <script src="https://code.ionicframework.com/nightly/js/ionic.bundle.js"></script> </head> <body> <ion-nav-bar class="nav-title-slide-ios7 bar-positive"> <ion-nav-back-button class="button-icon ion-arrow-left-c"> </ion-nav-back-button> </ion-nav-bar> <ion-nav-view animation="slide-left-right"></ion-nav-view> <script id="master.html" type="text/ng-template"> <ion-view title="Home"> <ion-header-bar class="bar-subheader item-input-inset"> <label class="item-input-wrapper"> <i class="icon ion-ios7-search placeholder-icon"></i> <input type="search" placeholder="Search" ng-model="filter"> </label> </ion-header-bar> <ion-nav-buttons side="right"> <a class="button" ng-click="scrollBottom()"> Scroll To Bottom </a> </ion-nav-buttons> <ion-content> <div class="list"> <a class="item my-item item-thumbnail-left" collection-repeat="pet in pets | filter:filter" collection-item-height="90" collection-item-width="'100%'" ui-sref="detail({petsId: pet.id })"> <img ng-src="http://placekitten.com/60/{{55 + ($index % 10)}}"> <h2>{{pet.firstName}}</h2> <p>{{pet.id}}</p> </a> </div> </ion-content> </ion-view> </script> <script id="detail.html" type="text/ng-template"> <ion-view title="{{pet.id}}"> <ion-content class="padding"> {{pet.id}} {{pet.firstName}} </ion-content> </ion-view> </script> </body> </html> <script src="js/index.js"></script>
</body>
</html>
Collection repeat and navigation - Script Codes CSS Codes
body { cursor: url('https://ionicframework.com/img/finger.png'), auto;
}
.list .my-item.item { left: 0; right: 0; transition:All 1s ease !important; -webkit-transition:All 1s ease !important; -moz-transition:All 1s ease !important; -o-transition:All 1s ease !important;
}
.my-item.item.ng-leave.ng-leave-active,
.my-item.item.ng-enter { opacity: 0 !important;
}
.my-item.item.ng-leave,
.my-item.item.ng-enter.ng-enter-active { opacity: 1 !important;
}
Collection repeat and navigation - Script Codes JS Codes
angular.module('ionicApp', ['ionic'])
.factory('PetService', function () { var pets = []; for (var i=0; i<3000; i++) { pets[i] = { id: i, 'firstName': 'Name' + i };
}
return { all: function () { return pets; }, get: function (petId) { return pets[petId]; }
};
})
.config(function($stateProvider, $urlRouterProvider) { $stateProvider .state('master', { url: "/master", controller:'MasterCtrl', templateUrl: "master.html" }) .state('detail', { url: "/detail/:petsId", controller:'DetailCtrl', templateUrl: "detail.html" }); $urlRouterProvider.otherwise("/master");
})
.controller('MasterCtrl', function($scope, PetService, $ionicScrollDelegate) { $scope.pets = PetService.all(); $scope.scrollBottom = function() { $ionicScrollDelegate.scrollBottom(true); };
})
.controller('DetailCtrl', function($scope, $stateParams, PetService) { $scope.pet = PetService.get($stateParams.petsId);
});
Developer | Mike Hartington |
Username | mhartington |
Uploaded | September 21, 2022 |
Rating | 3 |
Size | 2,871 Kb |
Views | 16,192 |
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 |
Dynamic slides | 2,346 Kb |
Ionic Fading Menu | 3,594 Kb |
Centered | 3,248 Kb |
Ionic Chat example | 3,926 Kb |
A Pen by Mike Hartington | 2,247 Kb |
Magical Flex-box | 2,182 Kb |
Ng-maps | 2,665 Kb |
Nested Flex | 2,062 Kb |
TextAngular-HTML Editor | 2,533 Kb |
Ionic and Material | 2,330 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 |
Heartbeat | Apetrov | 2,079 Kb |
Brown by pure CSS, no image, no javascript | Aaronchuo | 2,652 Kb |
Expert Help | SinceSidSlid | 4,064 Kb |
JQuery exercise | Brian-baum | 3,780 Kb |
SVG Basics | HipsterBrown | 1,852 Kb |
Dragonball Dragon Radar | DouglasGlover | 2,157 Kb |
Twinner Spinner II | Katydecorah | 2,974 Kb |
CSS3 Button Examples | Volusion | 3,377 Kb |
Myprofile | SoufianeAbid | 2,451 Kb |
CSS Dynamic Width Square Div | Elleestcrimi | 2,861 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!