Skip to content

Instantly share code, notes, and snippets.

View junaidahmed501's full-sized avatar
🏠
Working from home

Junaid junaidahmed501

🏠
Working from home
View GitHub Profile
@apuravchauhan
apuravchauhan / index.ftl
Created September 15, 2018 18:43
Java freemarker template converted from ReactJS JSX component
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Apurav Chauhan</title>
</head>
<body>
@btroncone
btroncone / subscription-cleanup.md
Last active April 19, 2022 22:29
Cleaning up subscriptions in Angular

Which do you prefer?

Adding to common sub, calling subscription.unsubscribe() in ngOnDestroy:

export class MyComponent {
  private _subscription: Subscription;
  
  ngOnInit() {
    this._subscription = myObservable