Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
1 vote
2 answers
88 views

I have this piece of code <input matInput type="number" [(ngModel)]="value" (ngModelChange)="onChange(true)" /> But I want to be able to enter only numbers, ...
1 vote
1 answer
94 views

I have simple matInput element from angular-material library: <mat-form-field class="example-form-field"> <mat-label>Clearable input</mat-label> <input matInput type=...
2 votes
1 answer
121 views

I want to submit my input when pressing enter. I tried to do it like that: input.setvalue('test'); const result = await input.host(); await result.sendsKey('enter'); expect(input.getValue()).toBe(''); ...
1 vote
1 answer
73 views

I'm having trouble centering the value of the input vertically. When the density is -3 and the font size is 1em the value of the input is not centered correctly. Also the label alignment when there's ...
0 votes
1 answer
382 views

I ́ve encountered this problem where I use the mat Input <mat-form-field> <input matInput placeholder="Ex. Pizza" value="Sushi"> </mat-form-field>` The thing is, ...
0 votes
0 answers
180 views

I have a problem after updating to angular 12 from angular 11 the whole project is red with errors in VS Code wherever I'm using input type="number" with min = "1" and [(ngModel)]. ...
0 votes
0 answers
1k views

I am trying to add a custom mask in angular using regular expression. Here is the mask I want: Characters allowed: Capital Letters, Small Letters, and Numbers Length of the field: 20 Can start the ...
0 votes
1 answer
1k views

I'm trying to style my mat input field on an error by adding an error icon next to the clear field icon like this: I can't find any way to add the icon. Thank you for your help in advance. My HTML: &...
3 votes
2 answers
781 views

I implemented custom control based on official guides using ControlValueAccessor: https://material.angular.io/guide/creating-a-custom-form-field-control https://blog.angular-university.io/angular-...
0 votes
1 answer
1k views

I've got a basic Angular Material input field like this: <mat-form-field appearance="outline"> <input matInput type="text"> <button ...
user avatar
0 votes
1 answer
1k views

I have the following input and I want to fire the event after pressing enter: <input matInput type="number" min="0" placeholder="0" (keyup.enter)=...
1 vote
2 answers
3k views

Hi I am working in Angular and in one of the field which is phone number ,I want to mask the string on HTML view only except the last 3 characters. How can I do that ? Example: - 1212121212 as ...
0 votes
1 answer
1k views

I want to allow user edit only time in my datetime form-field, but when user submits form the value is null <form [formGroup]="activityForm" (ngSubmit)="onSubmit()"> <...
1 vote
0 answers
360 views

I'm trying to create a reusable matInput with controlValueAccessor. When I pass the type with @Input(), I got the good behavior but my data number is convert in string. I create a stackblitz https://...
1 vote
1 answer
2k views

I'm trying to implement a counter form field. It has two buttons; one for incrementing the count value and one for decrementing it. Implementation has been pretty straightforward so far. <mat-form-...

15 30 50 per page
1
2 3 4 5

AltStyle によって変換されたページ (->オリジナル) /