File

src/app/ceph/block/iscsi-tabs/iscsi-tabs.component.ts

Implements

OnInit

Metadata

selector cd-iscsi-tabs
styleUrls ./iscsi-tabs.component.scss
templateUrl ./iscsi-tabs.component.html

Index

Properties
Methods

Constructor

constructor(router: Router)
Parameters :
Name Type Optional
router Router No

Methods

navigateTo
navigateTo(url)
Parameters :
Name Optional
url No
Returns : void
ngOnInit
ngOnInit()
Returns : void

Properties

url
Type : string
import { Component, OnInit } from '@angular/core';

import { Router } from '@angular/router';

@Component({
  selector: 'cd-iscsi-tabs',
  templateUrl: './iscsi-tabs.component.html',
  styleUrls: ['./iscsi-tabs.component.scss']
})
export class IscsiTabsComponent implements OnInit {
  url: string;

  constructor(private router: Router) {}

  ngOnInit() {
    this.url = this.router.url;
  }

  navigateTo(url) {
    this.router.navigate([url]);
  }
}
<tabset>
  <tab heading="Overview"
       i18n-heading
       [active]="url === '/block/iscsi/overview'"
       (select)="navigateTo('/block/iscsi/overview')">
  </tab>
  <tab heading="Targets"
       i18n-heading
       [active]="url === '/block/iscsi/targets'"
       (select)="navigateTo('/block/iscsi/targets')">
  </tab>
</tabset>

./iscsi-tabs.component.scss

Legend
Html element
Component
Html element with directive

result-matching ""

    No results matching ""