core/forms/ip-range-input-list.component.ts
selector | c8y-ip-range-input-list |
templateUrl | ./ip-range-input-list.component.html |
Properties |
Methods |
Inputs |
Accessors |
data |
Type : Array<{ ip: string; cidr: number; }>
|
add |
add()
|
Returns :
void
|
remove | ||||
remove(index)
|
||||
Parameters :
Returns :
void
|
ipRangeList |
Type : Array<literal type>
|
data | ||||
getdata()
|
||||
setdata(list)
|
||||
Parameters :
Returns :
void
|
<c8y-form-group class="m-t-8 m-b-8">
<ul c8yInputGroupListContainer class="list-unstyled">
<li class="m-b-8" *ngFor="let item of data; let i = index">
<c8y-input-group-list [index]="i" (onAdd)="add()" (onRemove)="remove($event)">
<input
type="text"
name="ipAddress"
class="form-control m-r-4"
placeholder="{{ 'IP range start, e.g.' | translate }} 192.168.0.1"
style="flex-grow: 2"
[(ngModel)]="item.ip"
[required]="true"
#ipAddress
/>
<input
type="number"
name="cidr"
[min]="0"
class="form-control"
placeholder="{{ 'e.g.' | translate }} 20"
[(ngModel)]="item.cidr"
[required]="true"
#cidr
/>
</c8y-input-group-list>
</li>
</ul>
</c8y-form-group>