mauricioribeiro

banking-menu.component.ts

Dec 6th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import {Component, OnInit, ViewChild} from "@angular/core";
  2. import { Router } from "@angular/router";
  3. import { Location } from "@angular/common";
  4. import { NgForm } from "@angular/forms";
  5.  
  6. @Component({
  7.   selector: "app-banking-menu",
  8.   templateUrl: "./banking-menu.component.html",
  9.   styleUrls: ["./banking-menu.component.scss"]
  10. })
  11. export class BankingMenuComponent implements OnInit {
  12.  
  13.   @ViewChild(NgForm) timeForm;
  14.  
  15.   time: string;
  16.  
  17.   constructor(private router: Router, private _location: Location) {
  18.   }
  19.  
  20.   ngOnInit() {}
  21.  
  22.   return() {
  23.     this._location.back();
  24.   }
  25.  
  26.   redirectCheckout() {
  27.     this.router.navigate(["/configuracao/bandeiras"], {
  28.       queryParams: { type: "checkout" }
  29.     });
  30.   }
  31.  
  32.   redirectDelivery() {
  33.     this.router.navigate(["/configuracao/bandeiras"], {
  34.       queryParams: { type: "delivery" }
  35.     });
  36.   }
  37.  
  38.   redirectRemoval() {
  39.     this.router.navigate(["/configuracao/bandeiras"], {
  40.       queryParams: { type: "removal" }
  41.     });
  42.   }
  43. }
Add Comment
Please, Sign In to add comment