UNPKG

@hicoder/angular-cli

Version:

Angular UI componenets and service generator. It works with the mean-rest-express package to generate the end to end web application. The input to this generator is the Mongoose schema defined for the express application. mean-rest-express exposes the Res

44 lines (41 loc) 1.9 kB
<%_ let sbo = searchBarObj; if (sbo.showSearchBox) { %> <div class="input-group"> <input type="search" class="form-control border border-secondary" id="<%-schemaName%>TextSearch" #<%-schemaName%>TextSearch [(ngModel)]="searchText" (search)="$any($event.target).blur();searchList();" placeholder="Search for <%for (let [idx,fld] of sbo.stringBoxFields.entries()){%><%if (idx!=0) {%>, <%}%><%-fld.displayName%><%}%>"> <div *ngIf="searchText" class="input-group-append icon-search-clear"> <span > <i class="fas fa-times-circle" (click)="onSearchTextClear()" title="Clear"></i> </span> </div> <div class="input-group-append"> <button type="button" class="btn btn-outline-secondary" (click)="searchList()"><i class="fas fa-search"></i></button> </div> </div> <%}%><%_ if (typeof noMoreSearchArea == 'undefined' || !noMoreSearchArea) { %> <div class="search-criteria-card mt-1"> <div class="d-flex flex-wrap align-items-center"><%_ sbo.ownSearchFields.forEach( (field) => { let fn=field.fieldName, fD=field.displayName, Fn=field.FieldName, sn=schemaName, Sn=SchemaName, mn=moduleName, Mn=ModuleName; let obj = { field, fn, fD, Fn, sn, Sn, mn, Mn, } %><%- include('/widgets/search/normal/schema-search.field.html', obj) %> <%_ }) %> </div> <%_ if(sbo.hasArchive) {%> <hr> <%- include('/widgets/search/normal/schema-search.archive.html'); %> <hr><%}%> <%_ if(sbo.IDLookup) {%> <%_ if(!sbo.hasArchive) {%> <hr><%}%> <%- include('/widgets/search/normal/schema-search.id.html'); %> <hr><%}%> <div class="action-buttons"> <button type="button" class="btn btn-outline-success" (click)="searchList()">Search</button> </div> </div> <%}%>