Questions about Angular version 11, the web framework from Google. Use this tag for Angular questions which are specific to only version 11. Use tag Angular for any Angular questions which are not specific to an individual version
Questions tagged [angular11]
700 questions
10
votes
5 answers
Angular Update 10.2 to 11
I'm trying to update Angular in my project from version 10.2 to 11.0.
Running ng update:
@angular-devkit/build-angular 0.1002.0 -> 0.1100.1 ng update @angular-devkit/build-angular
@angular/cdk 10.2.7 -> 11.0.0 …

Kajetanoss
- 159
- 1
- 2
- 8
9
votes
3 answers
Chart.js Types of property 'type' are incompatible. Type 'string' is not assignable to type '"line" | "bar" | "scatter"
client:159 src/app/analytics-page/analytics-page.component.ts:211:26 - error TS2345: Argument of type '{ type: string; options: { responsive: boolean; }; data: { labels: string[]; datasets: { label: string; data: number[]; borderColor: string;…

Tatyana Molchanova
- 1,305
- 5
- 12
- 23
8
votes
2 answers
Reactive forms valueChanges method fires twice for one change on input fields
Am working in angular app, where used the valueChanges method to detect the changes. like :
this.MyFrm.controls['is_applicable'].valueChanges.subscribe(values => {
this.mainFunc()
});
But it trigger this function twice, To solve this, I…

Tarnjeet Singh
- 846
- 1
- 11
- 30
7
votes
6 answers
Type 'File | null' is not assignable to type 'File'. in angular 11
Hi I am new to Angular and currently I am working with Angular 11 project and there I have to upload a CSV file and extract the records of the file in client side and save them in the database via ASP.NET Web API.
Here I followed a tutorial and…

Nirdha
- 95
- 1
- 1
- 9
7
votes
2 answers
Export of name 'matAutocomplete' not found
I am unable to understand what went wrong with my code, I imported the modules and still I am getting this error " Export of name 'matAutocomplete' not found"
Note: I restarted my IDE compiled again several times after importing…

Arun-
- 846
- 3
- 22
- 41
7
votes
3 answers
Extending Angular DatePipe errors in Angular 11, worked in Angular 10
Originally, I had a simple extension to the DatePipe to transform a date value from our standard (YYYYMMDD format) so that the DatePipe in Angular could then use it.
export class SlsDatePipe extends DatePipe implements PipeTransform {
…

Steven Scott
- 10,234
- 9
- 69
- 117
6
votes
2 answers
How do you know what package version you need in angular?
I had an asp.net core app on Angular 10.2.4, decided to upgrade to 11.
Ran: ng update @angular/core@11 @angular/cli@11 it failed complaining of devkit. Uninstalled devkit, upgraded angular to 11.2.14 OK.
Now am trying to install devkit back.
npm…

Boppity Bop
- 9,613
- 13
- 72
- 151
6
votes
5 answers
Angular 12 update issue: Unknown error from PostCSS plugin
Hi after I ran "ng update @angular/core@12 @angular/cli@12" to upgrade from 11 to 12, and then "ng serve app" I keep getting the following error:
"Unknown error from PostCSS plugin. Your current PostCSS version is 8.2.14, but postcss-preset-env uses…

Telly Ipock
- 133
- 3
- 12
6
votes
3 answers
Property 'value' does not exist on type 'FilterMetadata' on primeng table
I am migrating a module from primeng 7 to primeng11 along with angular11 the code runs perfectly fine on ng serve the functionalities are working too but on build I am getting a weird error
error TS2339: Property 'value' does not exist on type…

Lakshmi
- 2,204
- 3
- 29
- 49
6
votes
0 answers
Add extension methods in Angular 11 library
Some time ago I created two simple file to extend functionalities for some types. I created a global.d.ts in this way:
export { }
declare global {
interface Date {
isLeapYear() : boolean;
}
interface Array {
…

erikscandola
- 2,854
- 2
- 17
- 24
6
votes
3 answers
Cannot set fileReplacements to replace folder content with Angular 11
I'm using the angular cli config fileReplacements in angular.json file to replace a folder content, like this:
{
"projects": {
"myProject": {
"architect": {
"build": {
"configurations": {
"prod": {
…

benshabatnoam
- 7,161
- 1
- 31
- 52
6
votes
5 answers
Lazy Loaded Routing Problem after Upgrade to Angular 11
I have a top-level router that lazy loads child-routed feature modules, that has stopped working properly after upgrading to Angular v11.0.1.
Logging out at the Router events in ng11, the feature module is loaded, and RouteConfigLoadStart and…

Cineris
- 501
- 1
- 5
- 13
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
issue in code "$event.target.checked" in angular 11
Using this example in my code: https://stackblitz.com/edit/angular-rskaug?file=src%2Fapp%2Fapp.component.html
Html in component
Typescript in…

Billu
- 2,733
- 26
- 47
5
votes
1 answer
Error when updating to Angular 11 from 8: Can't resolve 'util' in '/Users/foo/node_modules/request'
I'm in the process of making a huge update to my Angular 8 project → Angular 11.
I've followed the steps of https://update.angular.io/?l=3&v=8.2-11.0 pretty well.
There are a few packages in my project that don't seem to be compatible with v.^11, so…

Atticus29
- 4,190
- 18
- 47
- 84