customers-add-edit-two.component.ts 936 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import { Component, OnInit } from '@angular/core';
  2. import { Router } from '@angular/router';
  3. @Component({
  4. selector: 'ngx-customers-add-edit-two',
  5. templateUrl: './customers-add-edit-two.component.html',
  6. styleUrls: ['./customers-add-edit-two.component.scss']
  7. })
  8. export class CustomersAddEditTwoComponent implements OnInit {
  9. constructor(
  10. private router: Router
  11. ) { }
  12. admins =[{
  13. name:'',
  14. email:'',
  15. password:'',
  16. password_confirmation:''
  17. }];
  18. ngOnInit() {
  19. }
  20. previous(){
  21. this.router.navigate[('pages/register')];
  22. }
  23. next(){
  24. this.router.navigate[('pages/registerThree')];
  25. }
  26. plusAdmin(){
  27. this.admins.push({
  28. name:'',
  29. email:'',
  30. password:'',
  31. password_confirmation:''
  32. });
  33. console.log('forms after plus' , this.admins);
  34. }
  35. onDeleteRow(index:number) {
  36. this.admins.splice(index , 1);
  37. console.log('files after delete ',this.admins);
  38. }
  39. }