Skip to content

Instantly share code, notes, and snippets.

@Kalpesh300
Last active March 9, 2020 05:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kalpesh300/0f064911e307f0f74e00da5008e7beaa to your computer and use it in GitHub Desktop.
Save Kalpesh300/0f064911e307f0f74e00da5008e7beaa to your computer and use it in GitHub Desktop.
Demo Component
import { Component, OnInit, Input } from '@angular/core';
import { Subject } from 'rxjs';
@Component({
selector: 'app-demo',
templateUrl: './demo.component.html',
styleUrls: ['./demo.component.scss']
})
export class Demo implements OnInit {
statusUpdate: Subject<boolean>;
categoryUpdate: Subject<string>;
userUpdate: Subject<number>;
constructor() {
instantiation();
}
instantiation() {
this.statusUpdate = new Subject<boolean>();
this.categoryUpdate = new Subject<string>();
this.userUpdate = new Subject<number>();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment