Behaviour Subject Sidenav Toggle Angular 7 MaterialAngular HTML bindingAccess Parent @Component and vars from *Routed* Child ComponentHuge number of files generated for every Angular projectAngular 2 material : sidenav toggle from componentGlobal variables not retaining updated values from one component to another in angular 2Toggle multiple side navs in angular 4Get the url param from nested componentHow do I subscribe to changes in an angular model on an observable?Angular Updating Visibility based on Booleanhow to trigger observer.next() on property change
Ambiguity in notation resolved by +
Where is it? - The Google Earth Challenge Ep. 3
Has SHA256 been broken by Treadwell Stanton DuPont?
Does my opponent need to prove his creature has morph?
What would happen if Protagoras v Euathlus were heard in court today?
How to modify this code to add more vertical space in timeline that uses Tikz
Exponentiation with parentheses
How to control the output voltage of a solid state relay
Why is the year in this ISO timestamp not 2019?
Can a character with good/neutral alignment attune to a sentient magic item with evil alignment?
Should you only use colons and periods in dialogues?
Why is the UK still pressing on with Brexit?
What was the motivation for the invention of electric pianos?
Can I see Harvest moon in India?
Would it be unbalanced to increase a druid's number of uses of Wild Shape based on level?
How do we know that black holes are spinning?
Bash awk command with quotes
Wrong Schengen Visa exit stamp on my passport, who can I complain to?
Amortized Loans seem to benefit the bank more than the customer
Building Truncatable Primes using Nest(List), While, Fold
Why is this sentence grammatical?
Is using gradient descent for MIP a good idea?
Difference between system uptime and last boot time in windows
Is there any reason to concentrate on the Thunderous Smite spell after using its effects?
Behaviour Subject Sidenav Toggle Angular 7 Material
Angular HTML bindingAccess Parent @Component and vars from *Routed* Child ComponentHuge number of files generated for every Angular projectAngular 2 material : sidenav toggle from componentGlobal variables not retaining updated values from one component to another in angular 2Toggle multiple side navs in angular 4Get the url param from nested componentHow do I subscribe to changes in an angular model on an observable?Angular Updating Visibility based on Booleanhow to trigger observer.next() on property change
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
Im using angular material and i have placed the sidenav toggle button in the navbar. I am trying to subscribe to a boolean value to toggle the sidenav.The boolean is to be passed to one of the child components.
My service :
import Injectable from '@angular/core';
import BehaviorSubject, Observable from 'rxjs'
@Injectable()
export class SidenavService
private sidenav$ : BehaviorSubject<boolean>;
constructor()
this.sidenav$ = new BehaviorSubject<boolean>(false);
getData():Observable<boolean>
return this.sidenav$.asObservable();
updateData(data: boolean)
this.sidenav$.next(data);
console.log("Changed toggle",data);
Im updating the service in the navbar component like:
sidenavtoggle()
this.toggleSidenav.emit();
this.isOpen = !this.isOpen;
console.log("IS OPEN",this.isOpen);
this.sidenavService.updateData(this.isOpen);
;
}
I have injected the service and gave it in the providers for the component. Im subscribing to the observable in the child component sidebar component like:
constructor(private sidenavService:SidenavService)
this.prepareNavItems();
this.subsciption=this.sidenavService.getData().subscribe(data=>
console.log("RECEIVED DATA",data);
this.isExpanded=data;
);
The problem is that the data is subscribed only once when the component is loaded,and not changing when the boolean value is changed.HOw do i continuosly listen to changes in the boolean when updateData()
is called?
HTML :
<mat-nav-list >
<div class="side-bar-btn" [ngClass]="'is-active': toggle" (click)="clickEvent($event)">
<div class="side-bar-btn-box">
<div class="side-bar-btn-inner"></div>
</div>
</div>
<mat-list-item *ngFor="let navItem of navItems" routerLinkActive="sidebarlinkactive" routerLink="navItem.link" >
<a routerLinkActive="active">
<mat-icon mat-list-icon>navItem.icon</mat-icon>
<div matLine *ngIf="isExpanded">navItem.text</div>
</a>
</mat-list-item>
</mat-nav-list>
|
show 2 more comments
Im using angular material and i have placed the sidenav toggle button in the navbar. I am trying to subscribe to a boolean value to toggle the sidenav.The boolean is to be passed to one of the child components.
My service :
import Injectable from '@angular/core';
import BehaviorSubject, Observable from 'rxjs'
@Injectable()
export class SidenavService
private sidenav$ : BehaviorSubject<boolean>;
constructor()
this.sidenav$ = new BehaviorSubject<boolean>(false);
getData():Observable<boolean>
return this.sidenav$.asObservable();
updateData(data: boolean)
this.sidenav$.next(data);
console.log("Changed toggle",data);
Im updating the service in the navbar component like:
sidenavtoggle()
this.toggleSidenav.emit();
this.isOpen = !this.isOpen;
console.log("IS OPEN",this.isOpen);
this.sidenavService.updateData(this.isOpen);
;
}
I have injected the service and gave it in the providers for the component. Im subscribing to the observable in the child component sidebar component like:
constructor(private sidenavService:SidenavService)
this.prepareNavItems();
this.subsciption=this.sidenavService.getData().subscribe(data=>
console.log("RECEIVED DATA",data);
this.isExpanded=data;
);
The problem is that the data is subscribed only once when the component is loaded,and not changing when the boolean value is changed.HOw do i continuosly listen to changes in the boolean when updateData()
is called?
HTML :
<mat-nav-list >
<div class="side-bar-btn" [ngClass]="'is-active': toggle" (click)="clickEvent($event)">
<div class="side-bar-btn-box">
<div class="side-bar-btn-inner"></div>
</div>
</div>
<mat-list-item *ngFor="let navItem of navItems" routerLinkActive="sidebarlinkactive" routerLink="navItem.link" >
<a routerLinkActive="active">
<mat-icon mat-list-icon>navItem.icon</mat-icon>
<div matLine *ngIf="isExpanded">navItem.text</div>
</a>
</mat-list-item>
</mat-nav-list>
show me your html?
– Sheik Althaf
Mar 28 at 12:21
i have updated the html code @SheikAlthaf
– Mohit Harshan
Mar 28 at 12:22
Instead ofBehaviorSubjectwhy you are notInput Outputevent
– Bhagwat Tupe
Mar 28 at 12:24
Is yourconsole.log("RECEIVED DATA",data);logging the correct value on everyupdateDatacall ?
– ashish.gd
Mar 28 at 12:26
The console.log for RECEIVED DATA is only printing out once when page is loaded first @ashish.gd
– Mohit Harshan
Mar 28 at 12:31
|
show 2 more comments
Im using angular material and i have placed the sidenav toggle button in the navbar. I am trying to subscribe to a boolean value to toggle the sidenav.The boolean is to be passed to one of the child components.
My service :
import Injectable from '@angular/core';
import BehaviorSubject, Observable from 'rxjs'
@Injectable()
export class SidenavService
private sidenav$ : BehaviorSubject<boolean>;
constructor()
this.sidenav$ = new BehaviorSubject<boolean>(false);
getData():Observable<boolean>
return this.sidenav$.asObservable();
updateData(data: boolean)
this.sidenav$.next(data);
console.log("Changed toggle",data);
Im updating the service in the navbar component like:
sidenavtoggle()
this.toggleSidenav.emit();
this.isOpen = !this.isOpen;
console.log("IS OPEN",this.isOpen);
this.sidenavService.updateData(this.isOpen);
;
}
I have injected the service and gave it in the providers for the component. Im subscribing to the observable in the child component sidebar component like:
constructor(private sidenavService:SidenavService)
this.prepareNavItems();
this.subsciption=this.sidenavService.getData().subscribe(data=>
console.log("RECEIVED DATA",data);
this.isExpanded=data;
);
The problem is that the data is subscribed only once when the component is loaded,and not changing when the boolean value is changed.HOw do i continuosly listen to changes in the boolean when updateData()
is called?
HTML :
<mat-nav-list >
<div class="side-bar-btn" [ngClass]="'is-active': toggle" (click)="clickEvent($event)">
<div class="side-bar-btn-box">
<div class="side-bar-btn-inner"></div>
</div>
</div>
<mat-list-item *ngFor="let navItem of navItems" routerLinkActive="sidebarlinkactive" routerLink="navItem.link" >
<a routerLinkActive="active">
<mat-icon mat-list-icon>navItem.icon</mat-icon>
<div matLine *ngIf="isExpanded">navItem.text</div>
</a>
</mat-list-item>
</mat-nav-list>
Im using angular material and i have placed the sidenav toggle button in the navbar. I am trying to subscribe to a boolean value to toggle the sidenav.The boolean is to be passed to one of the child components.
My service :
import Injectable from '@angular/core';
import BehaviorSubject, Observable from 'rxjs'
@Injectable()
export class SidenavService
private sidenav$ : BehaviorSubject<boolean>;
constructor()
this.sidenav$ = new BehaviorSubject<boolean>(false);
getData():Observable<boolean>
return this.sidenav$.asObservable();
updateData(data: boolean)
this.sidenav$.next(data);
console.log("Changed toggle",data);
Im updating the service in the navbar component like:
sidenavtoggle()
this.toggleSidenav.emit();
this.isOpen = !this.isOpen;
console.log("IS OPEN",this.isOpen);
this.sidenavService.updateData(this.isOpen);
;
}
I have injected the service and gave it in the providers for the component. Im subscribing to the observable in the child component sidebar component like:
constructor(private sidenavService:SidenavService)
this.prepareNavItems();
this.subsciption=this.sidenavService.getData().subscribe(data=>
console.log("RECEIVED DATA",data);
this.isExpanded=data;
);
The problem is that the data is subscribed only once when the component is loaded,and not changing when the boolean value is changed.HOw do i continuosly listen to changes in the boolean when updateData()
is called?
HTML :
<mat-nav-list >
<div class="side-bar-btn" [ngClass]="'is-active': toggle" (click)="clickEvent($event)">
<div class="side-bar-btn-box">
<div class="side-bar-btn-inner"></div>
</div>
</div>
<mat-list-item *ngFor="let navItem of navItems" routerLinkActive="sidebarlinkactive" routerLink="navItem.link" >
<a routerLinkActive="active">
<mat-icon mat-list-icon>navItem.icon</mat-icon>
<div matLine *ngIf="isExpanded">navItem.text</div>
</a>
</mat-list-item>
</mat-nav-list>
edited Mar 28 at 14:40
Mohit Harshan
asked Mar 28 at 12:19
Mohit HarshanMohit Harshan
4942 silver badges15 bronze badges
4942 silver badges15 bronze badges
show me your html?
– Sheik Althaf
Mar 28 at 12:21
i have updated the html code @SheikAlthaf
– Mohit Harshan
Mar 28 at 12:22
Instead ofBehaviorSubjectwhy you are notInput Outputevent
– Bhagwat Tupe
Mar 28 at 12:24
Is yourconsole.log("RECEIVED DATA",data);logging the correct value on everyupdateDatacall ?
– ashish.gd
Mar 28 at 12:26
The console.log for RECEIVED DATA is only printing out once when page is loaded first @ashish.gd
– Mohit Harshan
Mar 28 at 12:31
|
show 2 more comments
show me your html?
– Sheik Althaf
Mar 28 at 12:21
i have updated the html code @SheikAlthaf
– Mohit Harshan
Mar 28 at 12:22
Instead ofBehaviorSubjectwhy you are notInput Outputevent
– Bhagwat Tupe
Mar 28 at 12:24
Is yourconsole.log("RECEIVED DATA",data);logging the correct value on everyupdateDatacall ?
– ashish.gd
Mar 28 at 12:26
The console.log for RECEIVED DATA is only printing out once when page is loaded first @ashish.gd
– Mohit Harshan
Mar 28 at 12:31
show me your html?
– Sheik Althaf
Mar 28 at 12:21
show me your html?
– Sheik Althaf
Mar 28 at 12:21
i have updated the html code @SheikAlthaf
– Mohit Harshan
Mar 28 at 12:22
i have updated the html code @SheikAlthaf
– Mohit Harshan
Mar 28 at 12:22
Instead of
BehaviorSubject why you are not Input Output event– Bhagwat Tupe
Mar 28 at 12:24
Instead of
BehaviorSubject why you are not Input Output event– Bhagwat Tupe
Mar 28 at 12:24
Is your
console.log("RECEIVED DATA",data); logging the correct value on every updateData call ?– ashish.gd
Mar 28 at 12:26
Is your
console.log("RECEIVED DATA",data); logging the correct value on every updateData call ?– ashish.gd
Mar 28 at 12:26
The console.log for RECEIVED DATA is only printing out once when page is loaded first @ashish.gd
– Mohit Harshan
Mar 28 at 12:31
The console.log for RECEIVED DATA is only printing out once when page is loaded first @ashish.gd
– Mohit Harshan
Mar 28 at 12:31
|
show 2 more comments
1 Answer
1
active
oldest
votes
try to use async pipe and also i have modified to your code some
import Injectable from '@angular/core';
import BehaviorSubject, Observable from 'rxjs'
@Injectable()
export class SidenavService
private sidenavSource$ = new BehaviorSubject<boolean>(false);
sidenav$ = this.sidenavSource$.asObservable();
updateData(data: boolean)
this.sidenavSource$.next(data);
console.log("Changed toggle",data);
In your HTML use async pipe
constructor(public sidenavService: SidenavService) //make the service public
<div matLine *ngIf="sidenavService.sidenav$ | async">navItem.text</div>
<button (click)="sidenavService.updateData(true)">open</button>
<button (click)="sidenavService.updateData(false)">close</button>
Tried brother,sorry but doesnt work .Changed Toggle is console logging correclty when i togggle using button . But the sidenavService.sidenav$ remains at false
– Mohit Harshan
Mar 28 at 12:44
i have removed get data method as in your code
– Mohit Harshan
Mar 28 at 12:46
try to print the data like this and navItem.text to sidenavService.sidenav$.value. and check what you have got in value after toggling
– Sheik Althaf
Mar 28 at 12:47
I tried it but with sidenavService.sidenav$ .It is always printing out false ..With ".value" .It doesnt print out anything
– Mohit Harshan
Mar 28 at 12:48
sidenavService.sidenav$ is now printing out [Object object']
– Mohit Harshan
Mar 28 at 12:50
|
show 11 more comments
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55397468%2fbehaviour-subject-sidenav-toggle-angular-7-material%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
try to use async pipe and also i have modified to your code some
import Injectable from '@angular/core';
import BehaviorSubject, Observable from 'rxjs'
@Injectable()
export class SidenavService
private sidenavSource$ = new BehaviorSubject<boolean>(false);
sidenav$ = this.sidenavSource$.asObservable();
updateData(data: boolean)
this.sidenavSource$.next(data);
console.log("Changed toggle",data);
In your HTML use async pipe
constructor(public sidenavService: SidenavService) //make the service public
<div matLine *ngIf="sidenavService.sidenav$ | async">navItem.text</div>
<button (click)="sidenavService.updateData(true)">open</button>
<button (click)="sidenavService.updateData(false)">close</button>
Tried brother,sorry but doesnt work .Changed Toggle is console logging correclty when i togggle using button . But the sidenavService.sidenav$ remains at false
– Mohit Harshan
Mar 28 at 12:44
i have removed get data method as in your code
– Mohit Harshan
Mar 28 at 12:46
try to print the data like this and navItem.text to sidenavService.sidenav$.value. and check what you have got in value after toggling
– Sheik Althaf
Mar 28 at 12:47
I tried it but with sidenavService.sidenav$ .It is always printing out false ..With ".value" .It doesnt print out anything
– Mohit Harshan
Mar 28 at 12:48
sidenavService.sidenav$ is now printing out [Object object']
– Mohit Harshan
Mar 28 at 12:50
|
show 11 more comments
try to use async pipe and also i have modified to your code some
import Injectable from '@angular/core';
import BehaviorSubject, Observable from 'rxjs'
@Injectable()
export class SidenavService
private sidenavSource$ = new BehaviorSubject<boolean>(false);
sidenav$ = this.sidenavSource$.asObservable();
updateData(data: boolean)
this.sidenavSource$.next(data);
console.log("Changed toggle",data);
In your HTML use async pipe
constructor(public sidenavService: SidenavService) //make the service public
<div matLine *ngIf="sidenavService.sidenav$ | async">navItem.text</div>
<button (click)="sidenavService.updateData(true)">open</button>
<button (click)="sidenavService.updateData(false)">close</button>
Tried brother,sorry but doesnt work .Changed Toggle is console logging correclty when i togggle using button . But the sidenavService.sidenav$ remains at false
– Mohit Harshan
Mar 28 at 12:44
i have removed get data method as in your code
– Mohit Harshan
Mar 28 at 12:46
try to print the data like this and navItem.text to sidenavService.sidenav$.value. and check what you have got in value after toggling
– Sheik Althaf
Mar 28 at 12:47
I tried it but with sidenavService.sidenav$ .It is always printing out false ..With ".value" .It doesnt print out anything
– Mohit Harshan
Mar 28 at 12:48
sidenavService.sidenav$ is now printing out [Object object']
– Mohit Harshan
Mar 28 at 12:50
|
show 11 more comments
try to use async pipe and also i have modified to your code some
import Injectable from '@angular/core';
import BehaviorSubject, Observable from 'rxjs'
@Injectable()
export class SidenavService
private sidenavSource$ = new BehaviorSubject<boolean>(false);
sidenav$ = this.sidenavSource$.asObservable();
updateData(data: boolean)
this.sidenavSource$.next(data);
console.log("Changed toggle",data);
In your HTML use async pipe
constructor(public sidenavService: SidenavService) //make the service public
<div matLine *ngIf="sidenavService.sidenav$ | async">navItem.text</div>
<button (click)="sidenavService.updateData(true)">open</button>
<button (click)="sidenavService.updateData(false)">close</button>
try to use async pipe and also i have modified to your code some
import Injectable from '@angular/core';
import BehaviorSubject, Observable from 'rxjs'
@Injectable()
export class SidenavService
private sidenavSource$ = new BehaviorSubject<boolean>(false);
sidenav$ = this.sidenavSource$.asObservable();
updateData(data: boolean)
this.sidenavSource$.next(data);
console.log("Changed toggle",data);
In your HTML use async pipe
constructor(public sidenavService: SidenavService) //make the service public
<div matLine *ngIf="sidenavService.sidenav$ | async">navItem.text</div>
<button (click)="sidenavService.updateData(true)">open</button>
<button (click)="sidenavService.updateData(false)">close</button>
edited Mar 28 at 12:51
answered Mar 28 at 12:34
Sheik AlthafSheik Althaf
9144 silver badges11 bronze badges
9144 silver badges11 bronze badges
Tried brother,sorry but doesnt work .Changed Toggle is console logging correclty when i togggle using button . But the sidenavService.sidenav$ remains at false
– Mohit Harshan
Mar 28 at 12:44
i have removed get data method as in your code
– Mohit Harshan
Mar 28 at 12:46
try to print the data like this and navItem.text to sidenavService.sidenav$.value. and check what you have got in value after toggling
– Sheik Althaf
Mar 28 at 12:47
I tried it but with sidenavService.sidenav$ .It is always printing out false ..With ".value" .It doesnt print out anything
– Mohit Harshan
Mar 28 at 12:48
sidenavService.sidenav$ is now printing out [Object object']
– Mohit Harshan
Mar 28 at 12:50
|
show 11 more comments
Tried brother,sorry but doesnt work .Changed Toggle is console logging correclty when i togggle using button . But the sidenavService.sidenav$ remains at false
– Mohit Harshan
Mar 28 at 12:44
i have removed get data method as in your code
– Mohit Harshan
Mar 28 at 12:46
try to print the data like this and navItem.text to sidenavService.sidenav$.value. and check what you have got in value after toggling
– Sheik Althaf
Mar 28 at 12:47
I tried it but with sidenavService.sidenav$ .It is always printing out false ..With ".value" .It doesnt print out anything
– Mohit Harshan
Mar 28 at 12:48
sidenavService.sidenav$ is now printing out [Object object']
– Mohit Harshan
Mar 28 at 12:50
Tried brother,sorry but doesnt work .Changed Toggle is console logging correclty when i togggle using button . But the sidenavService.sidenav$ remains at false
– Mohit Harshan
Mar 28 at 12:44
Tried brother,sorry but doesnt work .Changed Toggle is console logging correclty when i togggle using button . But the sidenavService.sidenav$ remains at false
– Mohit Harshan
Mar 28 at 12:44
i have removed get data method as in your code
– Mohit Harshan
Mar 28 at 12:46
i have removed get data method as in your code
– Mohit Harshan
Mar 28 at 12:46
try to print the data like this and navItem.text to sidenavService.sidenav$.value. and check what you have got in value after toggling
– Sheik Althaf
Mar 28 at 12:47
try to print the data like this and navItem.text to sidenavService.sidenav$.value. and check what you have got in value after toggling
– Sheik Althaf
Mar 28 at 12:47
I tried it but with sidenavService.sidenav$ .It is always printing out false ..With ".value" .It doesnt print out anything
– Mohit Harshan
Mar 28 at 12:48
I tried it but with sidenavService.sidenav$ .It is always printing out false ..With ".value" .It doesnt print out anything
– Mohit Harshan
Mar 28 at 12:48
sidenavService.sidenav$ is now printing out [Object object']
– Mohit Harshan
Mar 28 at 12:50
sidenavService.sidenav$ is now printing out [Object object']
– Mohit Harshan
Mar 28 at 12:50
|
show 11 more comments
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55397468%2fbehaviour-subject-sidenav-toggle-angular-7-material%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
show me your html?
– Sheik Althaf
Mar 28 at 12:21
i have updated the html code @SheikAlthaf
– Mohit Harshan
Mar 28 at 12:22
Instead of
BehaviorSubjectwhy you are notInput Outputevent– Bhagwat Tupe
Mar 28 at 12:24
Is your
console.log("RECEIVED DATA",data);logging the correct value on everyupdateDatacall ?– ashish.gd
Mar 28 at 12:26
The console.log for RECEIVED DATA is only printing out once when page is loaded first @ashish.gd
– Mohit Harshan
Mar 28 at 12:31