cards: Array<any>;
stackConfig: any;
recentCard: string = '';
constructor(public navCtrl: NavController,private http: Http, public navParams: NavParams,public modalCtrl: ModalController) {
this.stackConfig = {
throwOutConfidence: (offsetX, offsetY, element) => {
return Math.min(Math.abs(offsetX)/(element.offsetWidth/2), 1);
},
transform: (element, x, y, r) => {
this.onItemMove(element, x, y, r);
},
throwOutDistance: (d) => {
return 800;
}
};
}
ngAfterViewInit() {
// Either subscribe in controller or set in HTML
this.swingStack.throwin.subscribe((event: DragEvent) => {
event.target.style.background = '#ffffff';
});
this.cards = [{email: ''}];
this.addNewCards(1);
}
我已經完成了幾乎所有在論壇上提出的建議。仍然面臨同樣的問題。你有沒有找到解決方案?如果你有任何工作回購,請與我分享。 – Vasanth