@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
40 lines (32 loc) • 977 B
text/typescript
import { Component, OnInit, Input, OnChanges, ViewChild } from '@angular/core';
import { <%-SchemaName%>ListViewComponent } from './<%-schemaName%>-list-view.component';
({
<%- include(`/widgets/list-view/component.template.custom.ts`)%>
})
export class <%-SchemaName%><%-ComponentClassName%>Component extends <%-SchemaName%>ListViewComponent implements OnInit, OnChanges {
public fields: any = {<% for (let field of briefView) {%><%
if (field.alertDescription) {%>
description: '<%-field.fieldName%>',<%
}%><%
if (field.alertLinkDisplay) {%>
linkDisplay: '<%-field.fieldName%>',<%
}%><%
if (field.alertLinkURL) {%>
linkURL: '<%-field.fieldName%>',<%
}%><%
if (field.alertColor) {%>
color: '<%-field.fieldName%>',<%
}%><%
}%>
};
constructor() {
super();
}
override ngOnInit() {
super.ngOnInit();
}
ngOnChanges() {}
public hideAlert(id: number) {
this.list[id].mddsHideAlert = true;
}
}