import { Component, OnInit, Input } from '@angular/core'; import { Tournament } from 'tournee.businesslogic'; @Component({ selector: 'app-tournament-scheduling-container', templateUrl: './tournament-scheduling-container.component.html', styleUrls: ['./tournament-scheduling-container.component.css'] }) export class TournamentSchedulingContainerComponent implements OnInit { @Input() EditModel: Tournament; _expanded_section: string; constructor() { } ngOnInit() { } Toggle(section) { if (this.Expanded(section)) { this._expanded_section = null; } else { this._expanded_section = section; } } ExpandCollapseText(section) { if (this.Expanded(section)) { return "Click to Collapse"; } return "Click to Expand"; } Expanded(section) { return this._expanded_section == section; } }