kalidea/kaligraphi

View on GitHub
src/app/03-layout/tab-panel/tab-panel.component.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { ChangeDetectionStrategy, Component, OnInit, ViewEncapsulation } from '@angular/core';
import { FormControl } from '@angular/forms';

@Component({
  selector: 'app-tab-panel',
  templateUrl: './tab-panel.component.html',
  styleUrls: ['./tab-panel.component.sass'],
  encapsulation: ViewEncapsulation.None,
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class TabPanelComponent implements OnInit {

  formControl = new FormControl(2);

  showTab = true;

  constructor() {
  }

  changeTab() {
    this.formControl.patchValue((this.formControl.value + 1) % 3);
  }

  toggleTab() {
    this.showTab = !this.showTab;
  }

  ngOnInit() {
  }

}