Collection repeat and navigation

Size
2,871 Kb
Views
16,192

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 Previews

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);
});
Collection repeat and navigation - Script Codes
Collection repeat and navigation - Script Codes
Home Page Home
Developer Mike Hartington
Username mhartington
Uploaded September 21, 2022
Rating 3
Size 2,871 Kb
Views 16,192
Do you need developer help for Collection repeat and navigation?

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!

Mike Hartington (mhartington) Script Codes
Create amazing blog posts with AI!

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!