mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 04:14:21 +08:00
chore(build): all demos build in ngc w/ 2.0.0
all demos build in ngc w/ 2.0.0
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
import { Animation, ModalController, NavParams, ViewController } from 'ionic-angular';
|
||||
import { ModalController, NavParams, ViewController } from 'ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
@ -19,12 +19,6 @@ export class ModalFirstPage {
|
||||
let myModal = this.modalCtrl.create(ModalContentPage, { 'myParam': this.myParam });
|
||||
myModal.present();
|
||||
}
|
||||
openCustomAnimationModal() {
|
||||
let myModal = this.modalCtrl.create(ModalContentPage, {
|
||||
animation: 'my-fade-in',
|
||||
});
|
||||
myModal.present();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -53,28 +47,3 @@ export class ModalContentPage {
|
||||
export class ApiDemoApp {
|
||||
root = ModalFirstPage;
|
||||
}
|
||||
|
||||
export class FadeIn extends Animation {
|
||||
constructor(enteringView: ViewController, leavingView: ViewController) {
|
||||
super(enteringView.pageRef());
|
||||
this
|
||||
.easing('ease')
|
||||
.duration(1000)
|
||||
.fromTo('translateY', '0%', '0%')
|
||||
.fromTo('opacity', 0, 1)
|
||||
.beforeAddClass('show-page');
|
||||
}
|
||||
}
|
||||
Animation.register('my-fade-in', FadeIn);
|
||||
|
||||
export class FadeOut extends Animation {
|
||||
constructor(enteringView: ViewController, leavingView: ViewController) {
|
||||
super(leavingView.pageRef());
|
||||
this
|
||||
.easing('ease')
|
||||
.duration(500)
|
||||
.fromTo('opacity', 1, 0)
|
||||
.beforeAddClass('show-page');
|
||||
}
|
||||
}
|
||||
Animation.register('my-fade-out', FadeOut);
|
||||
|
Reference in New Issue
Block a user