validation error component in cdk.
This commit is contained in:
@@ -2,7 +2,7 @@ import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { CommandModalDemoComponent } from './command-modal-demo/command-modal-demo.component';
|
||||
import { CommandModalDemoRoutingModule } from './command-modal-demo-routing.module';
|
||||
import { DataGridModule } from '@poweredsoft/ngx-cdk-ui';
|
||||
import { DataGridModule, DsValidationErrorModule } from '@poweredsoft/ngx-cdk-ui';
|
||||
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import { CommandModalModule, PaginationModule, ConfirmModalModule,CommandModule } from '@poweredsoft/ngx-bootstrap';
|
||||
@@ -11,6 +11,7 @@ import { CommandModalModule, PaginationModule, ConfirmModalModule,CommandModule
|
||||
imports: [
|
||||
CommonModule,
|
||||
CommandModalDemoRoutingModule,
|
||||
DsValidationErrorModule,
|
||||
DataGridModule,
|
||||
CommandModalModule,
|
||||
FormsModule,
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<ng-container *psDataGridHeader>
|
||||
<button class="btn-primary btn" psbxCommandModal
|
||||
commandTitle="Adding a new merchant" commandText="Add"
|
||||
|
||||
[dataSource]="merchantDataSource" command="addMerchant"
|
||||
[template]="theModal">Create a new record</button>
|
||||
|
||||
@@ -57,17 +58,22 @@
|
||||
|
||||
<ng-template #changeName let-command let-loading="loading">
|
||||
New Name
|
||||
<input type="text" [attr.disabled]="loading" [(ngModel)]="command.name" placeholder="Entermerchant new name" class="form-control">
|
||||
<input type="text" [attr.disabled]="loading" [(ngModel)]="command.name" placeholder="Entermerchant new name" class="form-control">
|
||||
New Address
|
||||
<input type="text" required [attr.disabled]="loading" [(ngModel)]="command.address" placeholder="Entermerchant new Address" class="form-control">
|
||||
|
||||
</ng-template>
|
||||
|
||||
<ng-template #theModal let-command let-loading="loading">
|
||||
<ng-template #theModal let-command let-loading="loading" let-ds="dataSource">
|
||||
<form >
|
||||
Name
|
||||
<input type="text" required [disabled]="loading" name="name" [(ngModel)]="command.name" placeholder="Enter a merchant name" class="form-control" >
|
||||
<ps-ds-validation-error class="text-danger d-block" [dataSource]="ds" field="name">
|
||||
</ps-ds-validation-error>
|
||||
Address
|
||||
<input type="text" required [disabled]="loading" name="address" [(ngModel)]="command.address" placeholder="Enter the merchant's address" class="form-control" >
|
||||
<ps-ds-validation-error class="text-danger d-block" [dataSource]="ds" field="address">
|
||||
</ps-ds-validation-error>
|
||||
Date
|
||||
<input type="text" required [disabled]="loading" name="address" [(ngModel)]="command.address" placeholder="Enter the merchant's address" class="form-control" >
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user