Check if decorator exists on property

Is there a way to check if a property has some decorator?

There is a way to do this:

<input type="text" id="name" class="form-control"
       [required]='model.decorator["required"]'      [minlength]='=model.decorator["minlength"]?.value' maxlength="24"
       name="name" [(ngModel)]="hero.name"
       #name="ngModel" >
+4
source share

Source: https://habr.com/ru/post/1669845/


All Articles