Guest User

Untitled

a guest
Nov 22nd, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. <mat-horizontal-stepper #stepper>
  2. <mat-step></mat-step>
  3. <mat-step></mat-step>
  4. </mat-horizontal-stepper>
  5.  
  6. <button class="buttonImg" id="buttonnxt" (click)="goForward(stepper)"
  7. type="button"></button>`
  8.  
  9. goForward(stepper) {
  10.  
  11. this.stepperCurrentIndex = stepper;
  12.  
  13. switch (this.stepperCurrentIndex) {
  14. case 0: {
  15. this.project0linking()
  16. //before project0linking() containing asynchronous call should
  17. finish after that stepper.next should be called
  18. stepper.next(stepper);
  19. break;
  20. }
  21. case 1: {
  22. this.project1linking();
  23. //before project1linking() containing asynchronous call should
  24. finish after that stepper.next should be called
  25. stepper.next(stepper);
  26. break;
  27. }
  28. case 2: {
  29. this.project2linking();
  30. //before project2linking() containing asynchronous call should
  31. finish after that stepper.next should be called
  32. stepper.next();
  33. break;
  34. }
  35. }
  36. }
  37.  
  38. linking(){
  39. //http call
  40. Only after completion of this call stepper.next() should be called
  41. }
Add Comment
Please, Sign In to add comment