Skip to content

Instantly share code, notes, and snippets.

@msarsha
Created February 22, 2018 21:25
Show Gist options
  • Save msarsha/3b059121982c361b717e69293ab98ab2 to your computer and use it in GitHub Desktop.
Save msarsha/3b059121982c361b717e69293ab98ab2 to your computer and use it in GitHub Desktop.
@Injectable()
export class NastyService {
constructor(@Inject(CASE_LOGIC_HANDLER) private caseHandlers: CaseLogicHandler[]) {
}
doNastyOperation(key: any) {
switch (key) {
case 1:
// logic
case 2:
// logic
case 3:
// logic
case 4:
// logic
default:
// logic
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment