Questions tagged [angular14]

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

536 questions
0
votes
3 answers

How to refactor this code to remove duplication?

There I have 2 methods(create and update) that push data to api. actually i need to optimize createUser and updateUser methods cuz is similar for 99%. also maybe you have any idea how better to set directly nullable id property from router & check…
0
votes
1 answer

Millisecond counter from date using RxJS and Angular 14

I am trying to setup a counter from a specific date using RxJS on an Angular 14 project, but the counter seems wrong. Milliseconds only change on the red spot, seconds are changing on the orange spot, but seconds should change at the blue spot, and…
p0mman
  • 78
  • 7
0
votes
1 answer

NG0304: 'mat-select' is not a known element (used in the 'LoginPage' component template):

I just created a basic app and am trying to use Angular Material. This is an Ionic 6 / Angular 14 app. I'm getting the error below when trying to use mat-select: I have added it to the imports in my app.module here: import { NgModule } from…
Joe Starnes
  • 471
  • 1
  • 6
  • 20
0
votes
1 answer

How dynamic create component inside clicked table cell

some.component.html
Cell Text
@Component({ selector: 'app-my-component', template: '
My…
0
votes
1 answer

Angular 14 Behaviorsubject is returning the previous value in ngOnInit() when component is initialized

I have a component with following ngOnInit and save method. I have a behaviorsubject which i am using tonotify when save action is performed. Default value is null. but after i save and reopen the component, it is coming up with previous value and…
Mukil Deepthi
  • 6,072
  • 13
  • 71
  • 156
0
votes
0 answers

Angular 14 Materiel change background and foreground color in theme

I'm trying to change the background and the forground color of my theme. My primary, accent colors are working, but not the background/foreground. I created a color-palette.scss and added to angular.json anguarl.json "styles": [ …
viglu
  • 125
  • 1
  • 9
0
votes
0 answers

Angular 14 running npm install after upgrade from 12 throwing lot of error

I am upgrading my angular app from v12 to v14. I did the following: npm cache clean --force npm install -g @angular/cli now when i do 'ng version' i get following i.e there is error against typescript and @angular-devkit/build-angular. Also none of…
Mukil Deepthi
  • 6,072
  • 13
  • 71
  • 156
0
votes
1 answer

Delegate authentication to the B2C Active Directory and not to all users in Angular 14 with MSAL

I have created an Active Directory in Azure and user management must be managed with a web application in Angular 14 with rxjs7 and with MSAL-Angular v2 and some APIs in Nodejs. Now in this section of code, in the authority…
0
votes
0 answers

error TS2322: Type 'unknown' is not assignable to type 'NgIterable'

I've created a custom component for my data table. The same component works fine in other projects with Angular < 14. Since I've update Angular to v14 I got the errors below. In the tsfile, this is how I declare tableData //imports... @Component({ …
FQDEV
  • 173
  • 3
  • 13
0
votes
1 answer

Upgrade Angular Material from 13 to 14

I am trying to upgrade my Angular application that uses material from Angular 13 (13.1.0) to 14 (14.0.1). I am using steps provided at https://update.angular.io/?v=13.0-14.0. My Angular and CLI versions upgraded successfully but getting following…
Abhi
  • 1,624
  • 2
  • 16
  • 29
-1
votes
1 answer

Replace custom object in an observable array based on matching object property

So I'm fetching an observable array of custom IPix objects (Observable) from a db (via an API) and then updating a record in the db by passing an edited copy of the IPix object back to the API in a PUT request (based on…
-1
votes
1 answer

Migrtion: help seeking for Angular 5 Project need to Migrate Angular 14

help seeking for Angular 5 Project need to Migrate Angular 14 pakage.json file "name": "my-app", "version": "0.0.2", "license": "MIT", "scripts": { "ng": "ng", "start": "ng serve", "build:prod": "ng build --prod", "test": "ng…
-1
votes
1 answer

Form value is undefined or empty Angular 14

I am getting the form values as undefined upon form submit. @ViewChild('someForm', { static: true }) form: ElementRef; public apiReponse: JsonResponse; this.route.queryParams .pipe( …
af_khan
  • 1,030
  • 4
  • 25
  • 49
-1
votes
1 answer

Compile Module dynamically with providers in Angular 14

I need to create a module with a composite of submodules that represents minimum required imports for my package to work. This composite of modules depends on external config, and i want to compile submodules dynamically without taking care about…
-1
votes
1 answer

How can I match my unmatched apostrophes in Angular?

I have an application that matches certain words in long paragraphs. The word can sometimes find it without an apostrophe, for example = "cant", but cannot find it when written as "can't" in a paragraph. So it can't match, how can i solve it? There…
greJuva
  • 21
  • 4