Questions tagged [angular16]

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

120 questions
0
votes
1 answer

How to add Legacy pre-made ESLint configs to Angular 15 project - Angular 15 to 16

I'm in the process of upgrading my app to version 16 from version 15, I encountered some linting errors, turns out some plugins are removed from angular-eslint 16 onward and the remedy is to add those removed one manually to get you going. The…
Rathma
  • 1,196
  • 2
  • 33
  • 65
0
votes
2 answers

Index.html generation failed Angular 16

I have migrated Angular from 15 to 16 but when I try to build the project it throws an error: angular.json: { "$schema": "./node_modules/@angular/cli/lib/config/schema.json", "version": 1, "newProjectRoot": "projects", "projects": { …
Pathik Vejani
  • 4,263
  • 8
  • 57
  • 98
0
votes
0 answers

cdk-virtual-scroll-viewport dynamic height

I am working on a Ionic 7 application with Angular 16. In this version of Ionic, ion-virtual-scroll was deprecated and they recommend to use the @angular/cdk ScrollingModule. Ionic Virtual Scroll Migration The problem is the following: I have the…
0
votes
0 answers

Angular 16 app on IIS return 403 forbidden for asset folder files

I have deployed an angular 16 app on two different server in IIS, files inside the asset folder working/loading properly from one server, not from the other published app (returning 403 forbidden). The strange behavior of this app is that it loads 5…
habib ul haq
  • 824
  • 6
  • 13
0
votes
1 answer

Argument of type 'MatSort | null' is not assignable to parameter of type 'MatSort'

I try to get sorted data from MatTableDataSource using this code: this.source = this.dataSource.sortData(this.dataSource.filteredData,this.dataSource.sort); but I got this error: Argument of type 'MatSort | null' is not assignable to parameter of…
i.fayza
  • 25
  • 1
  • 1
  • 3
0
votes
0 answers

Can someone make this Angular 16 checkbox input code more efficient and cleaner?

I have a simple boolean in my angular 16 ts component uploadEnabled. What I want is the checkbox to be checked if uploadEnabled is true and vice versa. When I click on the checkbox I want uploadEnabled to toggle accordingly with the state of the…
Brian Reinhold
  • 2,313
  • 3
  • 27
  • 46
0
votes
0 answers

Can't bind to 'ngModel' since it isn't a known property of 'input'. I also import FormsModule in ngModule still giving error

`ngModel not working error image HTML code Typescript page error NG8002: Can't bind to 'ngModel' since it isn't a known property of 'input'.
0
votes
1 answer

How to convert the following code into non callbacks?

This is in mean-stack, angular16 JWT authentication part of code: module.exports = function(app) { app.use(function(req, res, next) { res.header( "Access-Control-Allow-Headers", "Origin, Content-Type,…
0
votes
0 answers

Injecting FormControlDirective says it can't find unspecified name

I'm injecting FormControlDirective in my CVA like so: @Component({ selector: 'app-boolean-select', standalone: true, imports: [ReactiveFormsModule], template: '', }) export class…
0
votes
1 answer

Angular ControlValueAccessor detect parent validator changes

When implementing a ControlValueAccessor I need to dynamically display some content based on whether or not the control is required. I know I can do this to get the control: readonly #control = inject(NgControl, {self: true}) protected…
0
votes
0 answers

details HTML element in Angular appears to be working backwards, with 'open' absent, details.open gives true

I am having a terrible time trying to capture the state of a
element in Angular 16. The best I have got so far after using the good ol chat AI and lots of Stackoverflow was do do this in the html
Brian Reinhold
  • 2,313
  • 3
  • 27
  • 46
0
votes
0 answers

Angular standalone directive with "input" selector not applied globally

Angular 16.1.0 (Standalone architecture) I've created a standalone directive to be applied to all inputs: import { Directive, ElementRef } from '@angular/core'; @Directive({ standalone: true, selector: 'input', }) export class RedInput { …
0
votes
0 answers

find-an-entity library is not compatible with Angular Ivy - Angular 16

I am getting error related to find-an-entity package. Below is the error: Error: src/app/pages/ratings-reviews/ratings-reviews.module.ts:11:5 - error NG6002: 'FindAnEntityModule' does not appear to be an NgModule class. 11 FindAnEntityModule …
Pathik Vejani
  • 4,263
  • 8
  • 57
  • 98
0
votes
1 answer

How do I unit testing for Ionic Capacitor Status Bar?

I run my unit testing and I got Error: "StatusBar" plugin is not implemented on web Currently this is from my app.component.ts loadTheme = (theme) => { if(this.platform.is('capacitor')) { if (theme.theme_style.split(';')[2] == 'light')…
0
votes
0 answers

i have got an error on running the command ng build please rectify

Im getting the above error on ngbuild while deploying in firebase I tried removing the cdn imports from the index.html file. Checked the dependencies of angular. Check the 3rd party libraries and its versions. I am using angular16.