最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

typescript - Angular datepicker "matDatepickerMin" error problem - Stack Overflow

programmeradmin5浏览0评论

I have a question that if the error "matDatepickerMin"'s message is dynamic like this :

   **<mat-error
      *ngIf="
        form.controls.date.hasError('matDatepickerMin')
      "
    >
     
      {{ form.controls.date.errors.message }}
    </mat-error>**

it does not sets the error message i have set in my 'ts' file, on searching what is the problem then i got that angular is not allowing me add message when "matDatepickerMin" error is active so what can i do here beacuse i have 3 different message for "matDatepickerMin" error.

I expect the error messages i am setting in my 'ts' file should be shown in the mat-error block

发布评论

评论列表(0)

  1. 暂无评论