import { Component, OnInit } from '@angular/core'; @Component({ selector: 'app-profile-tickets-container', templateUrl: './profile-tickets-container.component.html', styleUrls: ['./profile-tickets-container.component.css'] }) export class ProfileTicketsContainerComponent implements OnInit { private _currently_expanded: string; constructor() { } ngOnInit() { } Expanded(zone: string) { return this._currently_expanded == zone; } Toggle(zone: string) { if (this._currently_expanded == zone) { this._currently_expanded = null; } else { this._currently_expanded = zone; } } ExpandCollapseText(zone: string) { if (this.Expanded(zone)) { return "Click to Collapse"; } return "Click to Expand"; } }