আমরা আমাদের কোম্পানিতে নিজস্ব ফর্ম-ফিল্ড-উপাদান তৈরি করার চেষ্টা করছি। আমরা উপাদান ডিজাইনের উপাদানগুলি এগুলি মোড়ানোর চেষ্টা করছি:
ক্ষেত্র:
<mat-form-field>
<ng-content></ng-content>
<mat-hint align="start"><strong>{{hint}}</strong> </mat-hint>
<mat-hint align="end">{{message.value.length}} / 256</mat-hint>
<mat-error>This field is required</mat-error>
</mat-form-field>
পাঠ্যবাক্স:
<field hint="hint">
<input matInput
[placeholder]="placeholder"
[value]="value"
(change)="onChange($event)"
(keydown)="onKeydown($event)"
(keyup)="onKeyup($event)"
(keypress)="onKeypress($event)">
</field>
ব্যবহার:
<textbox value="test" hint="my hint"></textbox>
এটি প্রায় এই ফলাফল:
<textbox placeholder="Personnummer/samordningsnummer" value="" ng-reflect-placeholder="Personnummer/samordningsnummer">
<field>
<mat-form-field class="mat-input-container mat-form-field>
<div class="mat-input-wrapper mat-form-field-wrapper">
<div class="mat-input-flex mat-form-field-flex">
<div class="mat-input-infix mat-form-field-infix">
<input _ngcontent-c4="" class="mat-input-element mat-form-field-autofill-control" matinput="" ng-reflect-placeholder="Personnummer/samordningsnummer" ng-reflect-value="" id="mat-input-2" placeholder="Personnummer/samordningsnummer" aria-invalid="false">
<span class="mat-input-placeholder-wrapper mat-form-field-placeholder-wrapper"></span>
</div>
</div>
<div class="mat-input-underline mat-form-field-underline">
<span class="mat-input-ripple mat-form-field-ripple"></span>
</div>
<div class="mat-input-subscript-wrapper mat-form-field-subscript-wrapper"></div>
</div>
</mat-form-field>
</field>
</textbox>
তবে আমি কনসোলে "মাদুর-ফর্ম-ফিল্ডে অবশ্যই একটি ম্যাটফর্মফিল্ড কন্ট্রোল থাকা উচিত" । আমি অনুমান করি যে এটি মাদুর-ফর্ম-ফিল্ডের সাথে সরাসরি করার জন্য একটি মাদুইপুট-ক্ষেত্র নেই। তবে এটি এতে অন্তর্ভুক্ত রয়েছে, এটি কেবল এনজি-সামগ্রী প্রক্ষেপণের সাথে যুক্ত ing
এখানে একটি ব্লিটজ: https://stackblitz.com/edit/angular-xpvwzf