Questions tagged javascript

Explore the latest questions and answers asked by our top developers.

Automatic crash on Angular universal project on server

In the Angular universal project. After a while on the server, the site automatically crashes and the server needs to be restarted. These errors are in the log. This has happened twice in the last month. There are too many "Converting circular structure to JSON" errors in the log file. (node:24572) [DEP0005] DeprecationWarning: Buffer() is […]

How to write javascript conditional operator statement ‘?’ without using else ‘:’ [duplicate]

So I’m using typescript in Angular and I have this code in ngOnInit() : this.authService.isAuthenticate() ? this.router.navigate([‘/waiting-list’]) but I’m getting this error: [ ‘:’ expected.ts(1005) ]. I wanna use the new way to make if else statement (with ‘?’ operator). so maybe someone knows how to make it without else ‘:’ statement. Thank you. Source: […]

By red1dev
Published
Categorized as angular, ecmascript-6, javascript, typescript Tagged , , ,

How to call node.js libraries from server.js?

I am new to node.js. I have an application angular front end and node.js server. And there is a js library that I am trying to get data. What I am trying to do is user will press a button and pass data to server. Server will pass data to a node.js library and library […]

By none none
Published
Categorized as angular, javascript, node.js Tagged , ,

How to scroll to the top of matDialog in angular material

I am having issue scrolling to the top of a MatDialog in angular material. I tried let top = document.getElementById("top"); if (top !== null) { top.scrollIntoView({ behavior: "smooth", block: "end", inline: "nearest", }); top = null; } but it doesn’t scroll to the top at all. I also tried this answer from a stackoverflow question […]

By walexy
Published
Categorized as angular, angular-material, javascript Tagged , ,

ERR_CONTENT_LENGTH_MISMATCH Site Loads Partially

Im running into an issue on my site. The background of the site loads and the title but the rest does not. Previously, it use to load all the Angular JS scripts but now it does not. enter image description here Some things I found is the server is full. Nginx cannot create any logs. […]

By Josh Kitowski
Published
Categorized as angular, html, javascript, nginx Tagged , , ,

Fetching API data in Angular for fullcalendar

I have the function to return the api data for the user bills, and then mapped the data to conform to fullcalendar – when I console log the "this.calendarBills" its json format and the date is also formatted correctly, but when I set "events" for fullcalendar to this.calendarBills, it returns nothing on the calendar… export […]

what’s mean @ in node_modules dependency name? [duplicate]

I started node js and angular learning recently. I installed angular with npm install, in node_modules folder, some dependency starts with @… my question is what’s the difference between them that name starting with @ and them not starting with @… For more info see the below image… Thanks in advance Source: Angular Questions

By stackprogramer
Published
Categorized as angular, javascript, node.js, npm Tagged , , ,

Angular mat-dialog-title and mat-dialog-actions not sticking

I am not sure what I am doing wrong here, but my dialog does not seem to be utilizing my sections. This is how I am laying out the dialog: <ng-container ngProjectAs="[mat-dialog-title]"> <app-dialog-header header="Command Line Arguments"></app-dialog-header> </ng-container> <div mat-dialog-content fxLayout="column" fxLayoutGap="5px"> <textarea rows="15" class="primary-background"></textarea> </div> <div mat-dialog-actions fxLayout="row" fxLayoutAlign="space-between center"> <button mat-button>Cancel</button> <button mat-button color="accent">Save</button> […]

By Get Off My Lawn
Published
Categorized as angular, html, javascript, mat-dialog Tagged , , ,

Please Help. I had a problem in my angular project [closed]

I am adding item-components (that arrives from an API http request) to a homepage-component and it works fine. But when I for example navigate throughout the page and once I click on the back button , the item-components that where attached disappears from the homepage-component (**note that ** this only happens in this homepage-component, I […]

By Omar Afify
Published
Categorized as angular, api, html, javascript Tagged , , ,

Angular Guard doesnt work with rxjs filter

iam trying to use RouteGuard in my app to prevent unauthorized users from accessing it. My can activate method in Guard looks like this: canActivate( route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree> { return this.statusService.appStatus.pipe(filter(status=>{ return status.selectedAgency!=null; }),map(status=>{ console.log(status) if(status.selectedAgency.allowPreEdit){ return true; } else{ return false; } })) } Iam trying to filter default value […]

By Vartex05
Published
Categorized as angular, javascript, rxjs, typescript Tagged , , ,
1 1,070

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq