Skip to content

Instantly share code, notes, and snippets.

View fabiansch's full-sized avatar

Fabian fabiansch

  • Germany, Hamburg
View GitHub Profile
@kyr0
kyr0 / tab-hidden.directive.ts
Created June 26, 2017 18:44
Ionic 3 TabHiddenDirective to programmatically hide tabs using [tab-hidden]="true"; it is adaptive and also works fine on view changes
import {Directive, ElementRef, Input} from '@angular/core';
@Directive({ selector: '[tab-hidden]' })
export class TabHiddenDirective {
@Input('tab-hidden')
tabHidden: boolean;
private _tabElCache: Map<string, Element> = new Map();