Category "angular"

Angular canActivate guard - conditional based on a selector

I have a CanActivate guard service that has been working fine, until a new requirement came along. The original code was something like this: canActivate( r

async template bind from subscribe angular 13

I'm trying to bind data on subscribe on ngOninit, here is the page profile.component.ts below. export class ProfileComponent implements OnInit { public userDe

Navigation with arrow keys to the left does not work with input readOnly

I have built a table with 4 columns. 1 column is text and the other 3 are inputs that are set to readOnly. For this table I have written an arrowKeyCodeNavigati

How to edit data of dynamically created form in angular 8

I am new to Angular developmet.In my project,I have a form with dynamically add and remove input box using Add and Remove button in Angular 8 Application. After

Why do I receive data not on 1st click but on 2nd click in Angular?

There are multiple modules (for example career, departments, and many more) in which I receive data from SQL server through stored procedure (Select query), int

Mat-Option selected option based on patch value from api subscription

In my case i have several controls with mat-autocomplete with mat-options. in which the same form is handled for new entry creation and edit an existing entry d

How to get only one question to the preview page in survey management website in angular?

I am using querystring to h=get the questions on preview page but I am not able to get one question on 1st page and 2nd on another page after clicking next butt

How to make an angular page scrollable

I'm working on an Angular project in which I'm creating a form using the ionic-framework components. <ion-content> <form> <ion-item lines="

@Host() or ng-container incompatibility between angular 9 and 10

Here are two live examples on stackblitz: angular 9 angular 10 To check the difference between them, open console and notice that: In form-error-control-name.di

Edit value for a key in a Map in Angular

I have a model that uses a Map for eg: (I also have other properties such as Name) export class User { _id!: string; accounts!: Map<String,Number>

How can I delete a row by its SKU instead of its ID?

I try to delete the row using the sku of the product. I'm using spring boot and angular. I got an error when I added the sku on my button like this one (click)

How to show popup on mouse hover of marker in ngx-mapbox-gl

I am currently showing markers and popups on click of markers. We have a requirement now to show popups on hover. my template is like below : <mgl-map #map1

npm install -g @ionic/cli Unexpected token '.'

I want to install ionic 6 on my system. I have installed multiple versions of npm on my system using nvm . nvm ls D:\<user_name>\Projects\Ionic-6>nvm l

Build a dynamic interface for Object in angular

I have an JSON Object received from an api call and the Object will have multiple values but all of type string. How to I write an Interface for such an Object

how to use npm install's --force flag during Visual Studio publish process?

I have an Angular project in Visual Studio, along with a publish profile to publish to IIS. I've been successfully using this process in this project for some t

Create a custom table similar to primeng table

In our project earlier we used p-table from primeng. Now we try to create a custom one. So, I want to create a custom table similar to https://www.primefaces.or

in angular how to submit form on click on radio button

I'm using angular 13 for my project. I want to submit a feedback form by using the radio button. I don't want to give a specific button for submission.

What is best way to go about replacing 'deployUrl' in angular.json for v13?

I'm currently in the process of upgrading my app from v12 to v13 and noticed this warning pop up: Option "deployUrl" is deprecated: Use "baseHref" option, "APP_

How to call the same angular component multiple times using querySelector

So I have a component called custom-modal.component. The HTML file looks like this: <dialog id="custom-modal"> <ng-content></ng-content> <

I can not subscribe on mergeMap observable in angular 13

I want to implement a connexion senario based on Roles in angular. When the user click on CONNEXION button after filling in the form ( username - password), two