<div class="hs-panel-margin panel">
    <hs-panel-header name="ows" title="Add external data"></hs-panel-header>
    <div class="card-body">
        <form role="form" class="form">
            <div class="form-group">
                <div class="input-group">
                    <div class="input-group-prepend"><span class="input-group-text">Choose type</span></div>
                    <select class="form-control" [(ngModel)]="type" [ngModelOptions]="{standalone: true}">
                        <option *ngFor="let type of types" [value]="type.id">{{type.text}}</option>
                    </select>
                </div>
            </div>
        </form>
        <hr />
        <div compile="templateByType()"></div>
    </div>
</div>

<div class="hs-panel-margin panel">
    <hs-panel-header name="ows" title="Add external data"></hs-panel-header>
    <div class="card-body">
        <form role="form" class="form">
            <div class="form-group">
                <div class="input-group">
                    <div class="input-group-prepend"><span class="input-group-text">Choose type</span></div>
                    <select class="form-control" [(ngModel)]="type" name="type">
                        <option *ngFor="let type of types" [value]="type.id">{{type.text}}</option>
                    </select>
                </div>
            </div>
        </form>
        <hr />
        <!-- TODO: Shall be dynamically created -->
        <!--div *ngFor="let t of types"-->
            <hs-add-layers-arcgis *ngIf="type == 'arcgis'"></hs-add-layers-arcgis>
            <hs-add-layers-shp *ngIf="type == 'shp'"></hs-add-layers-shp>
            <hs-add-layers-wfs *ngIf="type == 'wfs'"></hs-add-layers-wfs>
            <hs-add-layers-wms *ngIf="type == 'wms'"></hs-add-layers-wms>
            <hs-add-layers-wmts *ngIf="type == 'wmts'"></hs-add-layers-wmts>
            <hs-add-layers-vector *ngIf="type == 'vector'"></hs-add-layers-vector>
        <!--/div-->
        <!--div compile="templateByType()"></div-->
    </div>
</div>

Include add-layers subtemplates in add-layers
Include add-layers subtemplates in add-layers
