Category "angular"

mat-datepicker change date format not working

I am using the providers in my module to change the format of the datepicker in FiltriRecuperoComponent see code below export const MY_FORMATS = { parse: {

Incorrect functioning of routes in Angular

When trying to navigate from 'users' to 'users/:id' like this this.router.navigate([`/users/${userId}`]); or this.router.navigate(['/users', userId]); it stay

how to grab the payload inside of withlatestfrom with ngrx?

hi i have the following code where the selector requires an index to grab a value from the store, I use withLatestFrom to grab this value from the store only th

Installing dependency produces: ERESOLVE unable to resolve dependency tree

When I try to install a dependency I get the following error. How can I fix this? npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm

call javascript void in angular

I am using an html template for a website in Angular This template uses JavaScript to perform page elements. My problem is that when I use ngfor to create an el

window.removeEventListener not working in Angular

I can't for the life of me find out, why the eventlistener isn't removed on the mouseup event. I have already tried a lot of different things, but I can't remov

Angular Ag-Grid row group empty render when querying DOM elements with angular-testing-library

I have an ag-grid that contains different columns and column groups, as well as row groups. I am trying to test the DOM elements displayed in the row group usin

@Injectable giving undefined in angular 13

Hello guys I've recently updated angular to the version 13 and I'm experiencing some issues regarding DI. When I call the ReflectiveInjector.resolveAndCreate()

How to return Observable from Callback

I have a service in which I want to implement the logic of an SDK. From this SDK I want to call an event that returns a payload. I want to create a method in wh

Angular not passing object to html page

I am having issues with learning angular, I didn't use to have these problems before, but now when I do these demos things work great until I switch from using

Angular - Async pipe in ngIf and text binding will not display first emitted value

I have very simple component template: <button (click)="emitNextValue()">Next Value</button> <p *ngIf="text$ | async"> {{ text$ | async }}

How to test an Angular method which calls service and gets values?

I am trying to test this method, I have tried spying but the coverage shows not covered. Basically what this method does is, it checks if there is data availabl

How to disable scroll on body when clicking on a p-dropdown within it

I am using few p-dropdown in my table header where I also have a horizontal scroll for it's container. When I click on any of these dropdowns, instead of openin

send "&" in url angular

I'm using the Angular version 12 I want to send the following object in query params: { dynamicQueryOperators: 6&dynamicQueryOperators=8 } But in the end

webpack-dev-server Disconnect and Trying to reconnect... spam

I just finished an angular project I was working on, but i noticed something in the console, which I'd love to hide if that's possible just to keep everything t

optional chaining in Angular Template

Compiled with problems:X ERROR src/app/components/users/users.component.html:2:22 - error TS2532: Object is possibly 'undefined'. 2 <ul *ngIf="loaded &

Flexbox: Making an inline component expand the full width of the the parent container

I have inherited this project from someone else and I would not have set it up like this in the first place, but I have this component list-item-component: <

Angular bootstrap dropdown-toggle not working

Add a css class dynamically: In my angular application, I am using bootstap dropdown,dropdown-toggle to display drop down on click of a button. But the drop dow

typescript - detect if the div is overflow with text (not working if -webkit-scrollbar display is set to none)

Below mentioned code works fine if the scrollbar is visible. But it stops working once i use ::-webkit-scrollbar {display: none;} and -ms-overflow-style: none;

Access JSON like object properties

I have a return object like so: Can you tell me how to access its properties? I have tried many ways with Lodash too. But no luck yet. Failure attempts: t.conf