Originally I was having issues with this package using Angular SSR as I was getting this error on import Window is not defined However, you can mock this in server.ts via the following: I’m now getting an error as stated in the title, SVG is not defined. IS there any way to mock this? I believe it uses https://github.com/svgdotjs/ under
Tag: angular
‘unexpected quantifier’ regexp error in IE11
I have a strings like SHM{GHT} and need to get a value from brackets (GHT in this example). I use RegExp to get it and everything worked fine before I open it in IE. My page broke here and I got an error unexpected quantifier. Here is my function I checked on CanIUse .match() should work fine, something wrong with
attempting to poll a server however rxjs methods may be incorrect as algorithm breaks
so I am attempting to poll my server. I am trying to poll my server every 5 seconds. And the poll times out after one minute. I have a few console logs in the method for debugging but the only console.log that fires even after waiting 5 seconds is ‘validate stream start’ I followed this tutorial without creating a separate
Remove unselected value from dropdown array – ngx-select-dropdown
context: Angular applications using the ngx-select-dropdown. A user can select multiple values, these values get sorted into “buckets” and sent to the api. Issue: I am unable to remove a selected item from the end array – this.filterState. I have added a check to ensure that an item cant be added more than once – a click to select the
I need to find a specific value in an array of arrays. Angular, Typescript
I need to find a value in an array of arrays, but when I use the .find it returns undefined The array of arrays is datos. And this is the Html: I have tried to access to the datos array of arrays and it returns an empty array, I want to use the array of arrays to display a table
Grouping elements from two arrays to one element of another array [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 1 year ago. Improve this question I have three arrays that I need to link to each other in this way: arr1 = [‘A’, ‘A, ‘B’,
How to write a validators function that should accept the value between 0 to 30 but not decimal value ?? in Angular
that the if user enter the value between 0 to 30 it should accept 0 ,2, 20 and but should not accept decimal value like 20.1 , 0.1 I have use validators min(0) and validators max(30) but it accept the decimal value Need a validators that should not accept decimal value If have to use regex pattern, can you give
Put module into component, angular
I need put a mdbModal into a component, but the component does’nt have a module.ts archive, when try this movement I get: I dont have examples in my collective project, What is the way of can import a module inside a component? I’m relatively new on angular. This is my parent module I dont have problems if I import the
Why mat-option text is not rendering in view sometimes?
I have a form where there is a mat-select field. The mat-select field will show value even if the option doesn’t match the list of options. Please take a reference of this stackblitz example. In this example, on button click, I am adding a value in a form that doesn’t match with theJSON values. The same thing I have implemented
How to get 1st true value for *ngIf inside *ngFor
I have an array of items that need to be displayed based on roles. I need the first value which will fulfil the ngIf condition. I am adding my code below: My Array(kind of how it will originally look): My Html: – UserRole is a string value that I get when a user logs-in. I need to add a ngClass