I encountered a design that needed multiple sliding “pages” of a somewhat complex set of date based data, each date on its own page.
I found that with creative JSON / Data management and using the “ng-repeat” method within an ion-slide control, I could get a quite sophisticated card swipe, with each card auto-populated with a full page of various data as they slide along. Like in:
<ion-slide ng-repeat="item in DataArray">
I started with a JSON “item” which setup first with some single values that are easily expressed in the ion-slide, like:
{{ item.ForDate| date }}
{{ item.ForWeek }}
Next the JSON data “item” was loaded with 2 different data arrays, one for my “Active” data and one for my “Completed” data. This data varies a lot for each day. Now the “item” is done and added to the DataArray as a “pageful” of data, something like:
function loadDateData() {
SlideIdx++;
DataArray[SlideIdx] = {
"ForDate": last_Date,
"ForWeek": last_Week,
"ActiveData": Active, //(an array)
"CompletedData": Completed //(an array)
};
};
Now, this code will elegantly present as sliding pages, one per date, whatever data lives in DataArray, like:
<ion-slide ng-repeat="item in DataArray">
{{ item.ForDate| date }}
{{ item.ForWeek }}
<div ng-repeat="Active in item.ActiveData">
(for data that repeats within a row/col grid)
<tbody ng-repeat="Completed in item.CompletedData">
(for data that repeats within a table)
This solution made a high level presentation of the daily item pages with minimal coding. Once you know you can repeat items and that data within the items can also repeat, you can get a lot done.
Nice work Ionics, Angulars, et al.