2016-07-07 52 views

回答

0
declare const Ladda: any; 
export class someComponent implements AfterViewInit{ 
    @ViewChild('scbutton') scbutton: ElementRef; 
    l:any; 
ngAfterViewInit() { 
     this.l = Ladda.create(this.scbutton.nativeElement); 
      } 
    } 

// u can use this.l.start() and this.l.stop() in ur submit logic 
0
import Ladda from 'ladda'; 

export class someComponent implements AfterViewInit { 
    @ViewChild('yourButton') yourButton: ElementRef; 
    l: any; 

    ngAfterViewInit() { 
     this.l = Ladda.create(this.scbutton.nativeElement); 
     this.l.start(); 
    } 
} 
相關問題