Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Related Rants
Fucking four hours wasted.
Bad idea
.subscribe(({ messages }) => {
this.messages = messages;
// Scroll to bottom of the chat content
this.chatcontent.nativeElement.scrollTop = this.chatcontent.nativeElement.scrollHeight;
});
because the dom is not manipulated that fast.
Good Idea:
ngAfterViewChecked(): void {
// Scroll to bottom of the chat content
this.chatcontent.nativeElement.scrollTop = this.chatcontent.nativeElement.scrollHeight;
}
rant
manipulation
fast
slow
fuck
dom
angular