Category "angular"

Trying to mock service property value

I'd like to mock the value of a service property my component uses. I can't seem to get the value to change however. The problem I'm having is getting the compo

Problem with mime type with combination of Nginx and angular

I had built angular project with following command npm run build --prod --base-href=./ --deploy-url=./ I am having nginx config as follows: worker_processes 4;

Google maps remove UI from tab order

In my application I have dialog that opens google maps. When navigating google maps with tab the UI at the bottom of the map is "tabable". How can I remove this

toggle sidenav from another component in angular

I want to toggle a sidenav from another component in Angular. I have 3 child Components: menu,content,header. Button is on header component.I want to click on b

How to know whether the navigation is cancelled or not?

I am navigating to a route but one of the route guard is returning false in Angular 13. how to know whether navigation is done or cancelled. I have done below b

Why does a proprety call {{hero.name}} work in a <h> but not in a <img>

In the template, the following code works normally: <h3>{{hero.name}}</h3> or even: <a routerLink="/details/{{hero.id}}">{{hero.name}}</a&

Set the date value to the mat Input date picker in Angular TS

I have a requirement to read the query parameter for date and set the value of the Mat Input value to the value read by the query parameter. I am using Mat date

How to insert array to object using postman and nodejs. Send the data to mongodb

I Write My code like this but it has error, How to rewrite this code db.collection('collection_name').insertOne({ name:req.body.name, details:[{ age:req.body.ag

this.activatedRoute.params is undefined in Angular

I have routing in app-routing.module.ts I want to get playerId and teamId from the router but it returns undefined in the console as I subscribe to it in AppCom

How to access an Angular Component using its injection token?

I'm working with Angular Material Drag and Drop. Material DnD is designed to create some components on the fly during the drag sequence. For instance the visual

SignalR WebSocket Closed with status code 1006 (no reason given) (only on the remote server after deployment)

I'm working with a project which combines angular app on a client-side and .net core 6 web API app on the server-side. To provide real-time communication betwee

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