member_webapp/src/app/pages/target/target-page.component.ts
2018-04-30 17:12:31 +09:00

26 lines
565 B
TypeScript

import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
@Component({
selector: 'of-pages-target',
templateUrl: './target-page.component.html',
})
export class TargetPageComponent implements OnInit {
tabs = undefined;
constructor(private router: Router) {
}
ngOnInit() {
const id = this.router.url.split('target/')[1].split('/')[0];
this.tabs = [
{ label: 'INFO', routerLink: ['/target/', id, 'info'] },
{ label: 'HISTORY', path: ['/target/', id, 'history'], disabled: true },
];
}
}