For questions regarding programming in Angular specific to version 12. Please include all relevant tags on your question; e.g.,[Angular], [TypeScript], etc.
Questions tagged [angular12]
664 questions
                    
                    69
                    
            votes
                
                4 answers
            
        Angular 12 'ng serve' builds apps slowly, almost like production builds
I've just migrated an app from Angular 11.2.7 to Angular 12. Everything runs fine, except that when I am developing and using 'ng serve', rebuild times are much, much slower now, to the point where it's frustrating.
I'm on an M1 iMac, using node…
         
    
    
        John
        
- 5,581
- 6
- 29
- 46
                    66
                    
            votes
                
                6 answers
            
        Angular 12 source map is missing in browser
We have upgraded to Angular 12 recently and facing a problem wherein the browser Source Map is missing and due to this we are unable to debug our component files as there aren't any.
Can anyone suggest what I am missing?
         
    
    
        ammad khan
        
- 1,022
- 1
- 10
- 14
                    62
                    
            votes
                
                2 answers
            
        throwError(error) is now deprecated, but there is no new Error(HttpErrorResponse)
Apparently throwError(error) is now deprecated. The IntelliSense of VS Code suggests throwError(() => new Error('error'). new Error(...) accepts only strings. What's the correct way to replace it without breaking my HttpErrorHandlerService…
         
    
    
        nop
        
- 4,711
- 6
- 32
- 93
                    40
                    
            votes
                
                1 answer
            
        Angular 12 warns about requested IE 11 support. Why?
After upgrading Angular from v.11 to v.12 I am getting the following warning:
Warning: Support was requested for IE 11 in the project's browserslist configuration. IE 11 support is deprecated since Angular v12.
For more information, see…
         
    
    
        Felix
        
- 9,248
- 10
- 57
- 89
                    35
                    
            votes
                
                13 answers
            
        Angular 12 Data path "" must NOT have additional properties (styleext)
What is wrong with the new version of Angular? Angular CLI 12.0.1 can't create new application. Tried to run ng new twelveApp and the cli complains dying Data path "" must NOT have additional properties (styleext).
I have tried to set the ng-new…
         
    
    
        Bellash
        
- 7,560
- 6
- 53
- 86
                    27
                    
            votes
                
                5 answers
            
        Error : Module '"@angular/material"' has no exported member "..."
i create a custom Angular material module, material.module.ts file and import the following Angular material UI components in this file like given below.
import { NgModule } from '@angular/core';
import { CommonModule } from…
        user16880324
                    27
                    
            votes
                
                1 answer
            
        Migration failed: Incompatible peer dependencies found - Upgrading Angular to Version 12
I am upgrading my apps from Angular v11 to Angular v12. I have this error when I try to upgrade Angular packages:
ng update @angular/core@12 @angular/cli@12
Migration failed: Incompatible peer dependencies found 
Package has an incompatible peer…
         
    
    
        NeNaD
        
- 18,172
- 8
- 47
- 89
                    23
                    
            votes
                
                11 answers
            
        Angular 6 to 12 Migration: Getting Multiple Warning: Css Minimizer Plugin: > Unexpected "$"
After migrating my angular 6 project to 12.
I am getting multiple warning in terminal
if in angular.json i set optimisation: false configuration then all issue get resolved but i don't want to make this changes it should be true only.
with…
         
    
    
        nks
        
- 623
- 1
- 8
- 19
                    21
                    
            votes
                
                1 answer
            
        Error in production build: Index html generation failed
Upgraded the Angular 10 project to Angular 12. But now on running production build, it is giving error
Index HTML generation failed.
undefined:6:720366 missing '}'
ng build --configuration production --aot
It is very difficult to find the error…
         
    
    
        Anuj TBE
        
- 9,198
- 27
- 136
- 285
                    19
                    
            votes
                
                4 answers
            
        Bootstrap 5 dropdown is not working on Angular 12
I'm trying to add the Bootstrap 5 dropdown in Angular 12 it's not working.
I have installed all the necessary packages, added them to the angular.json file.
Copied the exact example from Bootstrap 5 docs still not working.
In angular.json I have…
         
    
    
        gauthaman vijayan
        
- 215
- 1
- 2
- 5
                    15
                    
            votes
                
                3 answers
            
        Angular 12 import json into ts
I have a json file into src/assets/version.json with this content:
{"VERSION":"1.0.0"}
and I import the file into the *.ts, eg.:
import * as VersionInfo from 'src/assets/version.json';
@Component({
  selector: 'app-root',
  templateUrl:…
         
    
    
        ar099968
        
- 6,963
- 12
- 64
- 127
                    11
                    
            votes
                
                2 answers
            
        What benefits does Webpack 5 bring to Angular 12?
I updated to Angular 12 yesterday which uses Webpack 5.
The release notes blog says:
In the v11 update we added experimental support for Webpack 5. Today,
we’re happy to announce that we’re releasing a production ready
version of Webpack 5 support…
         
    
    
        Simon_Weaver
        
- 140,023
- 84
- 646
- 689
                    9
                    
            votes
                
                8 answers
            
        error NG6002: Appears in the NgModule.imports of AppModule, but itself has errors
I am having angular 12 in my local and building project which runs fine without any error.
My local setup:
Angular CLI: 12.0.5  
Node: 12.16.3  
Package Manager: npm 6.14.4  
OS: win32 x64  
Angular: 12.0.5
But while building my project on the…
         
    
    
        Hemant Kumar
        
- 135
- 1
- 1
- 12
                    9
                    
            votes
                
                3 answers
            
        Angular 12 Material shows cannot read property errorstate undefined of MatFormField
This is the simple HTML that I have written for single page web app
    
        
            
        
            
            
                
                    
    
    
         
    
    
                
            
        
     
                    
                
                    Frequently Asked Questions
 
    
    
        Himanshu Grover
        
- 91
- 1
- 1
- 3
                    8
                    
            votes
                
                1 answer
            
        Angular 12 Datepicker
I am trying to use material datepicker in Angular 12, but having error:
main.js:1 ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'localeChanges' of null
TypeError: Cannot read property 'localeChanges' of null
Any suggestion…
         
    
    
        Rodrigo
        
- 91
- 1
- 2