Questions tagged angular

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

Jitsi Meet works on Firefox and Microsoft Edge but not on Chrome

I use jitsi meet in my angular project, but face a problem with google chrome. I tried it on firefox and microsoft edge, it works good. 022-01-19T13:00:01.737Z [JitsiMeetJS.js] <Object.getGlobalOnErrorHandler>: UnhandledError: Cannot destructure property ‘id’ of ‘Gp(…)’ as it is undefined. Script: null Line: null Column: null StackTrace: TypeError: Cannot destructure property ‘id’ of ‘Gp(…)’ as […]

By juv expert
Published
Categorized as angular, google-chrome, jitsi-meet Tagged , ,

TS2322: Type ‘null’ is not assignable to type "name of interface"

I have problem in typescript file (Angular), when I want to set attribute of interface to null, it shows error (picture), I saw this on one site and it’s working there, I can’t resolve what is problem here, any kind of help will be welcome Thank you https://i.stack.imgur.com/dM1w4.png Source: Angular Questions

By SGAKLS
Published
Categorized as angular, typescript Tagged ,

Swiper angular not working when rendered inside ng-content of a generic component

I am trying to create a generic component which is intended to make the styling in the project similar. Each page has image slider as well as content data. When i try to do that, the swiper is not functional. An example to make it clear: The following is the generic styling component which has […]

By mjoy
Published
Categorized as angular, swiper Tagged ,

How to iterate over an array of objects in response data of a get API in angular?

Suppose I have a response body of an GET API in angular and its an array of objects it goes like this : 79: {customerId: ’61c1b85fa7b16079fe7b5b64′, title: ‘Mr’, phoneNumber: Array(0), jobProfile: ‘GOLD’, designation: ‘Uuuuuuuuuuuu’, …} 80: {customerId: ’61c1b904a7b16079fe7b5b65′, title: ‘Mr’, phoneNumber: Array(0), jobProfile: ‘DIAMOND’, designation: ‘Player’, …} 81: {customerId: ’61c1b94aa7b16079fe7b5b66′, title: ‘Mr’, phoneNumber: Array(0), jobProfile: […]

By Kishkin
Published
Categorized as angular, javascript Tagged ,

Not recognized "trackBy" angular directive after updating eslint to 8.0.1 version

When I run npx ng lint got "Missing trackBy function in ngFor directive @angular-eslint/template/use-track-by-function" although it’s already present in my source code but not recognized by a parser. Before updating eslint the analyses works fine. My .eslintrc.json { "root": true, "ignorePatterns": [ "projects/**/" ], "overrides": [ { "files": [ ".ts" ], "parserOptions": { "project": [ […]

By kamilx2
Published
Categorized as angular, angular-eslint, eslint Tagged , ,

How to create a RegEx for something like {{example:bool}}

I’m creating shortcodes inside an Angular application. To replace the content I’m using regular expressions. Replacing shortcodes like {{example}} to get "example" is working well. For that I’m using the following regex: /{+([^][]+?)}+/g But now the challenge. What if I have a shortcode with this structure: {{example:bool}}. I need "example" also in this case. What […]

By asored
Published
Categorized as angular, regex, typescript Tagged , ,

Angular 12 and ngx Boostrap

I’m using Angular 12 and ngx boostrap. i try to build and i have this error : This likely means that the library (ngx-bootstrap/modal) which declares BsModalService has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. […]

By SPONGEBOB
Published
Categorized as angular, ivy, ngx-bootstrap Tagged , ,

NX Upgrade only Jest, with nx migrations

I am currently using NX version 9.2.2 and I want to upgrade it to 13. I faced a lot of difficulties when upgrading. Currently I am trying to just upgrade the Jest. I am running this commands nx migrate @nrwl/[email protected] npm install nx migrate –run-migrations=migrations.json But getting this error when I run the last step […]

By Missak Boyajian
Published
Categorized as angular, jestjs, nrwl, nrwl-nx, reactjs Tagged , , , ,

How to test Custom Elements / Web Components with Testing-Library, Jest and JSDOM?

I am trying to test an Angular app with testing-library/[email protected] and [email protected] which uses custom-elements quite heavily. Unfortunately I am not quite sure if testing-library/JSDOM/Jest just don’t support the rendering of custom-elements or if I am missing something. The stylelib we’re using is build with stencil, shadow-dom is not used. Example template with custom-element: <div> […]

Primeng confirm dialog shows up twice randomly

My problem is that sometimes (I can not tell why and how to reproduce that bug) when I click confirm on dialog it runs code from accept but immediately opens the same confirm dialog agian. Why is that happening? This is my code: createGame() { if(this.games.filter(e => e.statusName === ‘in development’).length > 0){ this.confirmationService.confirm({ message: […]

By Rogal
Published
Categorized as angular, javascript, primeng Tagged , ,
1 2 3 6,761

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