|
@@ -1,4 +1,5 @@
|
|
import { Component } from '@angular/core';
|
|
import { Component } from '@angular/core';
|
|
|
|
+import { ActivatedRoute, Router } from '@angular/router';
|
|
|
|
|
|
export interface PeriodicElement {
|
|
export interface PeriodicElement {
|
|
order: number;
|
|
order: number;
|
|
@@ -26,4 +27,13 @@ const ELEMENT_DATA: PeriodicElement[] = [
|
|
export class OrderListComponent {
|
|
export class OrderListComponent {
|
|
displayedColumns: string[] = ['order', 'date', 'status', 'actions'];
|
|
displayedColumns: string[] = ['order', 'date', 'status', 'actions'];
|
|
dataSource = ELEMENT_DATA;
|
|
dataSource = ELEMENT_DATA;
|
|
|
|
+
|
|
|
|
+ constructor(
|
|
|
|
+ private readonly router: Router,
|
|
|
|
+ private readonly route: ActivatedRoute
|
|
|
|
+ ) {}
|
|
|
|
+
|
|
|
|
+ onOpenDetail(): void {
|
|
|
|
+ this.router.navigate(['./details'], { relativeTo: this.route });
|
|
|
|
+ }
|
|
}
|
|
}
|