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
0
votes
0 answers
Angular 12 not binding to values from webapi: returns NgFor only supports binding to Iterables such as Arrays
I've been unable to bind to a webapi call in Angular12/Typescript.
The browser displays this error:
ERROR Error: Cannot find a differ supporting object '[object Object]' of type 'object'. NgFor only supports binding to Iterables such as Arrays.
Data…

Dan
- 1
0
votes
1 answer
How to show week number using Angular material v12
I am using Angular material datepicker.
https://material.angular.io/components/datepicker/
Is there is way to show week numbers of this datepicker?

Ritwick Ghosh
- 1
- 1
0
votes
0 answers
How to solve 'Cannot read property 'bootstrap' of null' in angular 12?
I am trying to run an angular project in angular 12 which was built on angular 6. I successfully build the project but it showing the following error in the console,
'Cannot read property 'bootstrap' of null'
I have tried many solutions but none of…

Sayed Mahmud Raihan
- 93
- 1
- 4
- 11
0
votes
1 answer
Routing, AuthGuard and loading child module
I have a few problems here.
I have a login page with canActivate (which worked perfectly when the app was simple).
I have an admin module which is loaded with loadChildren.
In this module I have a Navbar and a sidebar.
Why is my routing not landing…

Ree
- 863
- 2
- 18
- 38
0
votes
1 answer
Cannot get ColorThief to work correctly in Angular, library methods are not found?
I am trying to use the Library ColorThief(https://lokeshdhakar.com/projects/color-thief/) in an Angular 12 project but have had no success getting it to work. I started by doing $ npm i --save colorthief and then in my desired component .ts…

SDotJ
- 11
- 4
0
votes
0 answers
Unexpected token: punc (:) [mathjax/es5/sre/mathmaps/de.js:2,19] after Upgrade to Angular12
I have upgraded my Angular app to version 12. Everything works except for mathjax. On running ng serve I receive below error
Error: mathjax/es5/sre/mathmaps/de.js from Terser
Unexpected token: punc (:) [mathjax/es5/sre/mathmaps/de.js:2,19]
at…

Owen Kelvin
- 14,054
- 10
- 41
- 74
0
votes
2 answers
Form Component submit form in angular 12
I create one user registration form and want submit this form, but I stuck here, my validation it's not work in submit form, also show my code,
This is Form submitting with validation, it's basic validation,
formcompoenet.componenet.html
Angular…

SAVe
- 814
- 6
- 22
0
votes
1 answer
angularCompiler.getNextProgram is not a function, angular 12 & custom-webpack
I've just update my angular 11 project to 12.
I'm using @angular-builders/custom-webpack package in my devDependencies and using the following command to build my angular project.
ng build --configuration=production --build-optimizer…

Mohammad Dayyan
- 21,578
- 41
- 164
- 232
0
votes
1 answer
Unable to fetch package information for 'library@latest': Cannot convert undefined or null to object
angular 12 add library is giving bellow error
Unable to fetch package information for 'library@latest': Cannot convert undefined or null to object
detail error message:
ℹ Using package manager: npm
✖ Unable to find compatible package. Using…

Aniruddha Das
- 20,520
- 23
- 96
- 132
0
votes
1 answer
Angular 12+ with Pixi 6 not initializing correctly
Currently trying to get Pixi.js 6 running with angular 12(but 11 does seem to face the same issue).
If I try to initialize a component with a canvas by pixi and add a sprite I do hit an issue with how Pixi initalizes it's base classes.
ERROR…

LeDon
- 529
- 7
- 21
0
votes
1 answer
Testing Angular Web components(Custom Elements) with protractor
When we use the angular custom element tag in the index.html and run our e2e tests using protractor, it causes timeout as angular is not found in the page as for Angular web components there are only entryComponents and no bootstrap component.…

Shashi Kiran
- 367
- 3
- 9
-1
votes
1 answer
How to add classname and set style for each td of tr table in angular 8
Trying to add classname and set some style for td of each tr in the table using typescript. I have tried, But it is not working. If anyone knows please help to find the solution.
app.component.ts:
ngOnInit() {
this.elRef.nativeElement
…

EMahan K
- 417
- 1
- 19
-1
votes
1 answer
Mat error is not getting shown the error message
I am using Mat control date range input control.
I want show error message when user misses to enter start date or end date.
here is my Html

AMDI
- 895
- 2
- 17
- 40
-1
votes
1 answer
Angular 12 unit test, spy a function inside subscribe
I'm subscribing to a behavior subject in onInit and based on the result I'm calling a function. My code is like
subscription = new Subscription();
constructor(private myService: MyService) {}
ngOnInit() {
this.subscription =…

e.k
- 1,333
- 1
- 17
- 36
-1
votes
1 answer
Wizard like component
I am making a registration wizard with five steps in same component. I made two html tables to start the implementation. The first table for first step and so on. I assumed if I make the first table invisible and second one as visible, then the…

Nealesh
- 629
- 6
- 12