|
@@ -1,5 +1,5 @@
|
|
|
import { Component, OnInit } from '@angular/core';
|
|
|
-import { Router } from '@angular/router';
|
|
|
+import { Router, ActivatedRoute } from '@angular/router';
|
|
|
|
|
|
@Component({
|
|
|
selector: 'ngx-customers-add-edit-two',
|
|
@@ -9,7 +9,8 @@ import { Router } from '@angular/router';
|
|
|
export class CustomersAddEditTwoComponent implements OnInit {
|
|
|
|
|
|
constructor(
|
|
|
- private router: Router
|
|
|
+ private router: Router,
|
|
|
+ private route: ActivatedRoute,
|
|
|
) { }
|
|
|
|
|
|
admins =[{
|
|
@@ -23,10 +24,10 @@ export class CustomersAddEditTwoComponent implements OnInit {
|
|
|
}
|
|
|
|
|
|
previous(){
|
|
|
- this.router.navigate[('pages/register')];
|
|
|
+ this.router.navigate(['../register'], {relativeTo: this.route});
|
|
|
}
|
|
|
next(){
|
|
|
- this.router.navigate[('pages/registerThree')];
|
|
|
+ this.router.navigate(['../registerThree'], {relativeTo: this.route});
|
|
|
}
|
|
|
plusAdmin(){
|
|
|
this.admins.push({
|