Skip to content

Commit b1d8e7b

Browse files
committed
Issue #37. [Ionic 1.2] - New slide box
1 parent 60dd976 commit b1d8e7b

File tree

5 files changed

+68
-1
lines changed

5 files changed

+68
-1
lines changed

app/scripts/app.js

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ angular.module('starter', [
1717
'supermodular.menu',
1818
'supermodular.elements',
1919
'supermodular.popover-menu',
20+
'supermodular.new-slide-box',
2021
'gMaps',
2122
'ngCordova'
2223
])

app/scripts/menu/menu.html

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<ion-side-menus enable-menu-with-back-views="false">
2-
<ion-side-menu-content>
2+
<ion-side-menu-content
3+
edge-drag-threshold="true">
34
<ion-nav-bar class="bar-stable">
45
<ion-nav-back-button>
56
</ion-nav-back-button>
@@ -34,6 +35,10 @@ <h1 class="title">Left</h1>
3435
<i class="icon ion-android-checkbox-outline"></i>
3536
Elements
3637
</ion-item>
38+
<ion-item nav-clear menu-close class="item-icon-left" href="#/app/new-slide-box">
39+
<i class="icon ion-arrow-swap"></i>
40+
New slide box
41+
</ion-item>
3742
<ion-item nav-clear menu-close class="item-icon-left" href="#/app/map">
3843
<i class="icon ion-map"></i>
3944
Map
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
(function() {
2+
'use strict';
3+
4+
angular
5+
.module('supermodular.new-slide-box')
6+
.controller('NewSlideBoxController', NewSlideBoxController);
7+
8+
NewSlideBoxController.$inject = [];
9+
10+
/* @ngInject */
11+
function NewSlideBoxController() {
12+
var vm = angular.extend(this, {
13+
items: getItems(),
14+
options: {
15+
loop: true
16+
}
17+
});
18+
19+
// ********************************************************************
20+
21+
function getItems() {
22+
var items = [];
23+
for (var i = 1;i <= 7;i++) {
24+
items.push({
25+
image: 'images/cards/face-' + i + '.jpg'
26+
});
27+
}
28+
return items;
29+
}
30+
}
31+
})();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<ion-view view-title="New slide box">
2+
<ion-content>
3+
<ion-slides options="vm.options">
4+
<ion-slide-page ng-repeat="item in vm.items">
5+
<img ng-src="{{item.image}}">
6+
</ion-slide-page>
7+
</ion-slides>
8+
</ion-content>
9+
</ion-view>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
(function() {
2+
'use strict';
3+
4+
angular
5+
.module('supermodular.new-slide-box', [
6+
'ionic',
7+
'supermodular.common'
8+
])
9+
.config(function($stateProvider) {
10+
$stateProvider
11+
.state('app.new-slide-box', {
12+
url: '/new-slide-box',
13+
views: {
14+
'menuContent': {
15+
templateUrl: 'scripts/new-slide-box/new-slide-box.html',
16+
controller: 'NewSlideBoxController as vm'
17+
}
18+
}
19+
});
20+
});
21+
})();

0 commit comments

Comments
 (0)