docs(demos): add list and item demo

This commit is contained in:
Drew Rygh
2015-10-01 11:36:04 -05:00
parent c89deca542
commit ec480b1fd9
4 changed files with 258 additions and 8 deletions

View File

@ -1,4 +1,4 @@
import {App, ActionSheet} from 'ionic/ionic';
import {App, ActionSheet, Animation} from 'ionic/ionic';
import {NgZone} from 'angular2/angular2';
function toTitleCase(str) {
@ -26,6 +26,7 @@ class DemoApp {
}
});
};
this.setupAnimations();
}
openMenu() {
@ -54,5 +55,26 @@ class DemoApp {
});
}
setupAnimations() {
this.animation = new Animation();
this.animation
.duration(2000)
var ionitronSpin = new Animation(document.querySelector('#ionitron'));
ionitronSpin
.from('transform', 'rotate(0deg)')
.to('transform', 'rotate(360deg)')
this.animation.add(ionitronSpin);
}
play() {
this.animation.play();
}
pause() {
this.animation.pause();
}
}