Skip to main content

All Questions

1 vote
4 answers
85 views

Should I use <form> when I use <mat-form-field> while building a Form?

I'm building a form and I'm confused if I should use mat-form-field tag from angular material alone without form tag, or I should wrapp everything with form html tag like the following <form> &...
Omar's user avatar
  • 53
2 votes
1 answer
50 views

How to merge validation error of matDatepicker and parent form

I'm currently building custom month picker component using the Datepicker from angular material library.The month picker should be able to use with reactive form like this. app.component.ts form = ...
bri zhao's user avatar
1 vote
1 answer
87 views

mat-form-field validation messages dispalying before any user interaction

Here is the code for reference, <div> <mat-form-field class="w-100 mt-2" appearance="outline"> <mat-label>Enter a name for your quote</mat-...
Mohanish Saim's user avatar
1 vote
2 answers
45 views

Issue with Patching Object Value to Angular FormControl in ngAfterViewInit

I'm working on an Angular form where I need to patch an object to a FormControl in ngAfterViewInit. However, I'm encountering an issue when trying to patch an object. Here's a simplified version of my ...
Toheed Shaikh's user avatar
1 vote
2 answers
69 views

Error message not displaying when input is touched and invalid

I'm working on an Angular component where I want to display an error message if the input field is touched and invalid. However, the error message is not appearing as expected. The error message "...
coder's user avatar
  • 673
0 votes
1 answer
73 views

My mat-form-field doesn't work unless it has a ngIf attribute even though it's redundant

I've been tasked to migrate a project that's using Angular v9 to Angular v17 and everything's been smooth so far without having to change much, but I've encountered a really weird bug and I can't find ...
Nethrenial's user avatar
1 vote
1 answer
79 views

How to use Angular Select

I want to select the data, which I previously designed as a different table in the backend section, with select and save it according to this selected operation. It seems logical to use angular ...
Mustafasan's user avatar
1 vote
2 answers
50 views

Error: control.registerOnChange is not a function with reactive form

I am trying to get the mat-select to open with 'tag2' selected. It works with a string[] but not with { id: number; name: string }[]. tags: { id: number; name: string }[] = [{ id: 1, name: 'tag1' }, ...
Jack's user avatar
  • 65
1 vote
1 answer
103 views

How to customize date validation error messages in Angular?

I am working on an Angular form where I need to validate a date input field. Currently, if I enter a non-date text like "Date" in the field, I receive the error message "Date is ...
coder's user avatar
  • 673
0 votes
0 answers
39 views

Input field shows "required" error immediately after clicking Create button, should show only when touched [duplicate]

I'm working on an Angular application where I'm creating a task using a form. The form has an input field that is marked as required. When I click the "Create" button, the input field ...
coder's user avatar
  • 673
1 vote
2 answers
1k views

How can I change the label font-size of an Angular mat-checkbox component?

I'm attempting to change the fontsize of mat-checkbox's label. Nothing I seem to attempt works as it's consistently being overriden by the component's default styles: !important ::ng-deep Setting ...
Andrew Biddle's user avatar
1 vote
1 answer
333 views

Angular Form Validation: Display Errors on Empty and Mismatched Passwords

I want to perform form validation. If the field is "dirty". An error should be displayed if there is nothing in the password field. If the passwords do not match, an error should also be ...
coder's user avatar
  • 673
0 votes
2 answers
71 views

Angular typed controls No seeing types

I am working updating some legacy forms to be more strongly typed and thus fix eslint errors. I keep running into issues where the .value operator on abstract controls throws an IDE error "...
Dylan's user avatar
  • 1
0 votes
1 answer
56 views

How to refresh the Columns based on selected value in another column of same row in Angular?

I have an Angular application that creates a dynamic table using Angular Material. There are three columns in the table: Type, InputValue, and OutputValue. Based on the value selection in the Type ...
Learner's user avatar
  • 91
0 votes
0 answers
351 views

NgMatero DateTimePicker showing different behavior in components

<mat-form-field> <mat-placeholder>DateTime</mat-placeholder> <mtx-datetimepicker-toggle [for]="datetimePicker" matSuffix></mtx-datetimepicker-toggle> ...
user14534955's user avatar

15 30 50 per page
1
2 3 4 5
12