Skip to content

Instantly share code, notes, and snippets.

View euangoddard's full-sized avatar

Euan Goddard euangoddard

View GitHub Profile
@jonrimmer
jonrimmer / switch-cases.directive.ts
Last active August 22, 2023 17:03
jrSwitchCases
import { Directive, Input, Host, TemplateRef, ViewContainerRef, OnInit, DoCheck } from '@angular/core';
import { NgSwitch } from '@angular/common';
@Directive({
selector: '[jrSwitchCases]'
})
export class SwitchCasesDirective implements OnInit, DoCheck {
private ngSwitch: any;
private _created = false;