Questions tagged [angular12]

For questions regarding programming in Angular specific to version 12. Please include all relevant tags on your question; e.g.,[Angular], [TypeScript], etc.

664 questions
5
votes
2 answers

How to compress Angular 11 application prod files

I am working on an application I have made deployment of my application now the issue I am facing is some of my prod files taking too much time load here is the screenshot from my network tab. I have also tried --aot and optimizer command while…
Kamran Khan
  • 1,042
  • 10
  • 21
5
votes
2 answers

NG3003: Angular 12 Circular Dependency in library - Ivy partial compilationMode

I have an issue presented here. I have a ParentComponent which has a child ChildComponent, and child has ParentComponent inside of it so there is a cycle here. This is the error I'm facing: ✖ Compiling with Angular sources in Ivy partial compilation…
5
votes
2 answers

After upgrading to Angular 12 getting Error: NGCC failed

I was working on Angular 8 project when the time came to upgrade it to Angular 12. Since I come exclusively from React environments, didn't think it would be this much of a hassle until I started. It has been 2 days that I have been following…
borgmater
  • 658
  • 3
  • 11
  • 35
5
votes
0 answers

Async tests fail due to timeout

We are using jest 27 for our project in Angular 12 for running our unit tests. Locally, these tests run correctly but runnig them in a cloud agent pipe they break, appearing this error: thrown: "Exceeded timeout of 5000 ms for a hook. Use…
jvb2008
  • 51
  • 3
5
votes
3 answers

Angular Type '{ domain: string[]; }' is not assignable to type 'string | Color'

I am using ngx-charts with Angular 12 and I'm getting this error message then I use this: colorScheme = { domain: ['#5AA454', '#A10A28', '#C7B42C', '#AAAAAA'] }; The error message is: Type '{ domain: string[]; }' is not assignable to type 'string…
deszok
  • 95
  • 1
  • 10
5
votes
2 answers

Global SCSS style is no longer loaded in Storybook with Angular 12

I am migrating a library to use Angular and Material 12 (currently in version 10), and Storybook is used to expose the various components of this library. To do so, I upgraded Angular and Material to version 12 with the Angular Update Guide,…
Tom Béfieux
  • 81
  • 1
  • 7
5
votes
3 answers

Angular styles from styles.scss are not always being applied

I added a few CSS properties to different mat-buttons on my Angular 12 based website. In order to not accidentally apply these properties to all mat-buttons, but only to the ones I want to apply them to, I added a class to the buttons and used it to…
Chris
  • 1,417
  • 4
  • 21
  • 53
5
votes
2 answers

Swagger auto generated file issue with _observableOf(null) in angular 12?

So i'm using swagger and Nswag for a very long time, I can see the auto generated methods used to generate a line like this to exit as default value: return _observableOf(null); ...And now with the same nswag json file, it…
Yogurtu
  • 2,656
  • 3
  • 23
  • 23
5
votes
3 answers

Angular 12 - Select dropdown option based on the value in template

I am working on a POC in which i am facing a challenge. Please help me solving it. Situation I have list of categories which needs to be displayed in a select dropdown I have a portal object which contains one of the categories in the select…
Brijesh
  • 59
  • 1
  • 2
  • 5
5
votes
1 answer

Apple Pay integration with Angular

I want to integrate ApplePay and GooglePay in our Angular application. For GooglePay, google has provided a useful package for npm. https://www.npmjs.com/package/@google-pay/button-angular I tried to find a similar good package for ApplePay but…
CharithJ
  • 46,289
  • 20
  • 116
  • 131
5
votes
3 answers

Mixed Content error after migrating from Angular 7 to 12

The stack: Angular 12 with .NET, running in a Docker container. Bundles are being built by @angular-devkit/build-angular:browser. Last working setup: The application ran previously on Angular 7, all the assets were indeed served over HTTPS. The…
Cosmic Luke
  • 53
  • 1
  • 4
5
votes
2 answers

CAPACITOR_ANDROID_STUDIO_PATH environment variable in Ionic 5

Tried to add CAPACITOR_ANDROID_STUDIO_PATH environment variable as. import { CapacitorConfig } from '@capacitor/cli'; const config: CapacitorConfig = { appId: 'com.barqrscanner.app', appName: 'barqrscannerapp', webDir: 'www', …
user10668235
5
votes
1 answer

How to fix npm audit vulnerabilities angular 12.0.3

After i create a new Angular 12.0.3 project, npm audit immediately detects 8 high and 40 moderate vulnerabilities. # npm audit report css-what <5.0.1 Severity: high Denial of Service - https://npmjs.com/advisories/1754 fix available via `npm audit…
Max Gusenbauer
  • 217
  • 2
  • 12
5
votes
0 answers

Angular 12 Update - CSS loading delay on angular SSR

I have recently updated my angular app version 11 to 12. also using SSR. previously it was working perfectly. now on SSR build it's loading CSS a bit late & display raw HTML first & after some time loads the CSS. I tried changing the sequence of the…
4
votes
2 answers

Ionic 5 When including Google Maps Api Key: TypeError: Failed to construct 'HTMLElement': Please use the 'new' operator

I get the following errors when I serve my Ionic 5 application: Uncaught TypeError: Failed to construct 'HTMLElement': Please use the 'new' operator, this DOM object constructor cannot be called as a function. at Reflect.
1 2
3
44 45