Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

Commit

Permalink
Updated to new Ionic
Browse files Browse the repository at this point in the history
  • Loading branch information
mlynch committed Aug 6, 2014
1 parent 695b780 commit b027e39
Show file tree
Hide file tree
Showing 50 changed files with 65,296 additions and 46,706 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*~
.*.sw*
6 changes: 6 additions & 0 deletions example/ionic.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "example",
"email": "",
"app_id": "",
"package_name": ""
}
20 changes: 7 additions & 13 deletions example/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,14 @@
<link href="css/app.css" rel="stylesheet">

<!-- angularjs scripts -->
<script src="lib/js/ionic.js"></script>
<script src="lib/js/angular/angular.js"></script>
<script src="lib/js/angular/angular-animate.js"></script>
<script src="lib/js/angular/angular-sanitize.js"></script>
<script src="lib/js/angular/angular-touch.js"></script>
<script src="lib/js/angular-ui/angular-ui-router.js"></script>
<script src="lib/js/ionic-angular.js"></script>
<script src="lib/js/ionic.bundle.js"></script>

<!-- cordova script -->
<script src="cordova.js"></script>

<!-- your app's script -->
<script src="js/app.js"></script>
<script src="js/ionic.cards.js"></script>
<script src="js/ionic.swipecards.js"></script>
<script src="js/services.js"></script>
<script src="js/controllers.js"></script>
</head>
Expand All @@ -34,14 +28,14 @@
'starter' is the name of this angular module (js/app.js)
-->
<body ng-app="starter" animation="slide-left-right-ios7" no-scroll>
<pane ng-controller="CardsCtrl">
<header-bar type="bar-transparent" title="'Help out'"></header-bar>
<ion-pane ng-controller="CardsCtrl">
<ion-header-bar type="bar-transparent" title="'Help out'"></ion-header-bar>

<swipe-cards>
<swipe-card on-swipe="cardSwiped()" id="start-card">
<swipe-card on-card-swipe="cardSwiped()" id="start-card">
Swipe down for a new card
</swipe-card>
<swipe-card ng-repeat="card in cards" on-destroy="cardDestroyed($index)" on-swipe="cardSwiped($index)">
<swipe-card ng-repeat="card in cards" on-destroy="cardDestroyed($index)" on-card-swipe="cardSwiped($index)">
<div ng-controller="CardCtrl">
<div class="title">
{{card.title}}
Expand All @@ -56,6 +50,6 @@
</div>
</swipe-card>
</swipe-cards>
</pane>
</ion-pane>
</body>
</html>
2 changes: 1 addition & 1 deletion example/www/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// the 2nd parameter is an array of 'requires'
// 'starter.services' is found in services.js
// 'starter.controllers' is found in controllers.js
angular.module('starter', ['ionic', 'ngTouch', 'ionic.contrib.ui.cards'])
angular.module('starter', ['ionic', 'ionic.contrib.ui.cards'])


.config(function($stateProvider, $urlRouterProvider) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,15 +208,15 @@
} else {
self._transformOriginLeft();
}
window.rAF(function() { self._doDragStart(e) });
ionic.requestAnimationFrame(function() { self._doDragStart(e) });
}, this.el);

ionic.onGesture('drag', function(e) {
window.rAF(function() { self._doDrag(e) });
ionic.requestAnimationFrame(function() { self._doDrag(e) });
}, this.el);

ionic.onGesture('dragend', function(e) {
window.rAF(function() { self._doDragEnd(e) });
ionic.requestAnimationFrame(function() { self._doDragEnd(e) });
}, this.el);
},

Expand Down Expand Up @@ -271,7 +271,7 @@
replace: true,
transclude: true,
scope: {
onSwipe: '&',
onCardSwipe: '&',
onDestroy: '&'
},
compile: function(element, attr) {
Expand All @@ -283,7 +283,7 @@
el: el,
onSwipe: function() {
$timeout(function() {
$scope.onSwipe();
$scope.onCardSwipe();
});
},
onDestroy: function() {
Expand Down
Loading

0 comments on commit b027e39

Please sign in to comment.