@@ -1,6 +1,6 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
/** Custom Buttons Configuration */
|
||||
import { SharesButtonsConfiguration } from './shares-buttons.config';
|
||||
@@ -24,7 +24,8 @@ export class SharesAccountViewComponent implements OnInit {
|
||||
* Fetches shares account data from `resolve`
|
||||
* @param {ActivatedRoute} route Activated Route
|
||||
*/
|
||||
constructor(private route: ActivatedRoute) {
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router) {
|
||||
this.route.data.subscribe((data: { sharesAccountData: any }) => {
|
||||
this.sharesAccountData = data.sharesAccountData;
|
||||
});
|
||||
@@ -66,4 +67,12 @@ export class SharesAccountViewComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
doAction(name: string) {
|
||||
switch (name) {
|
||||
case 'Modify Application':
|
||||
this.router.navigate(['edit-shares-account'], { relativeTo: this.route });
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user