angular6

Angular 6 validate number input

a 夏天 提交于 2020-08-26 19:55:15
问题 I have an input and the type is number. I want to set min and max, if the input is out of this range (< min or >max), the error will be displayed. My problem is that if the input is not empty but invalid, the error disappears (example: min =10, max =20, input =2000, still no error displays). I search on this site and there is a post about validation but the solution is to use < md-input-container> and < md-error>. I don't want to use < md-input-container> and < md-error>. Reference:here Is

load drop down values alphabetic order angular 6

≡放荡痞女 提交于 2020-08-26 09:29:32
问题 I am trying to load drop down with alphabetic order. currently i used unique value pipe for the drop down. how i add another pipe for get alphabetic order.. <select class="form-control fix-dropdown" required (change)="batchSorceList();" [ngClass]="{'is-invalid':glheaderform.submitted && orgname.invalid}" #orgname="ngModel" [(ngModel)]="orgNameModel.orgName" name="orgName"> <option value="undefined" disabled="true">--Select--</option> <option *ngFor="let bank of orgNameModel | unique ">{{bank