随笔分类 - 常用
摘要:el-table :data="data" :row-class-name="tableRowClassName" tableRowClassName({row, rowIndex}) { row.index = rowIndex; },
阅读全文
摘要:解决方法,将server.ts的代码改成: const port = process.env['PORT'] || 4200; 端口号变成4200,it works
阅读全文
摘要:Add this code in app.module.ts import { Injector, NgModule } from '@angular/core'; export let AppInjector: Injector; export class AppModule { construc
阅读全文
摘要:1. 下载了官方 demo 参考地址:https://github.com/angular/universal-starter/issues/514 运行命令: npm run build:ssr 会生成dist文件, 运行 npm run serve:ssr 会运行
阅读全文
摘要:改为: 存值: sessionStorage.setItem("currentFormAnswerData", window.btoa(unescape(encodeURIComponent( JSON.stringify(rowDatas) )))) 取值: JSON.parse(decodeUR
阅读全文
摘要:1. ng2-dragula 插入新数据之后再拖拽,数据总是显示在最上面 https://stackoverflow.com/questions/63532041/ng2-dragula-after-adding-new-item-its-getting-displayed-at-the-top c
阅读全文
摘要:this.answerTypeForm.controls.items['controls'].forEach(element => { element["controls"]["optionFeedbackIdsArray"].setValue(this.optionIdsArray[index])
阅读全文
摘要:链接 1. 父组件中调用子组件 <app-footer #footer></app-footer>2. 父组件中调用子组件的值 <button (click)="getChildMsg()">获取子组件的msg</button> @ViewChild('footer') footer: any;ge
阅读全文
摘要:1. 只能输入整型 <input matInput formControlName="value" (keypress)="validateNum($event)" trim="blur"> validateNum(event) { const pattern = /[0-9\+\-\ ]/; le
阅读全文
摘要:https://www.tektutorialshub.com/angular/meta-service-in-angular-add-update-meta-tags-example/#:~:text=The%20Angular%20Meta%20Service%20makes,them%20to
阅读全文
摘要:一. 什么是angular自定义标签? angular自定义标签,就是将angular里面的某些component转换成一个自定义标签,这个标签可以在任何平台使用,而不依赖angular,真的做到了跨平台使用。 二. 如何使用angular自定义标签? 有一些可以借鉴的网站可以先看下: angula
阅读全文
摘要://set validators this.addCriteriaForm.controls["comparatorValueType"].setValidators(Validators.required); this.addCriteriaForm.controls["comparatorVal
阅读全文
摘要:<mat-select class="mat-select-custom" formControlName="sourceData" (selectionChange)="sourceDataSwitch($event)" required> <mat-option value="">{{ 'Ple
阅读全文
摘要:TIPS: 只需要传之前确定好顺序就行, 比如 <app-hct-patient-page-sidebar [multiSurveyDatas]="multiSurveyDatas" [multipleSurveysQuestionsAndAnswersDatas]="multipleSurveys
阅读全文
摘要:let customBody = { "appID": APP_CONFIG['appID'], "apiVersion": "2", "surveyType": assessmentTypeName, "language": this.usingLanguage, "userID": this.c
阅读全文
摘要:let tempList = []; let resultList = []; //filter DLQIMonthScoreWholeArray to {value+name} data["survey"].map((item)=>{ if(tempList.indexOf(item["surve
阅读全文
摘要:angular material - matTable 不是主动渲染数据,如果数据改变之后要重新渲染 @ViewChild(MatTable) table: MatTable<PeriodicElement>; this.table.renderRows(); @ViewChild(MatTable
阅读全文
摘要:父组件 <app-hct-patient-page-eligibility [patientProfileSurvey]="patientProfileSurvey" [plaquePsoriasisSurvey]="plaquePsoriasisSurvey"></app-hct-patient-
阅读全文
摘要:data["survey"]=data["survey"].sort((a, b) => b.scheduledDateTime.localeCompare(a.scheduledDateTime)) 最新时间显示在最前面 js 删除两个数组中id相同的对象 let arr1 = [{id:'1',
阅读全文
摘要:让chart自适应父元素的宽和高 <div #ContainerRef class="card-body"> <ngx-charts-bar-vertical-stacked [view]="[ContainerRef.offsetWidth, 400]" [scheme]="verticalBar
阅读全文

浙公网安备 33010602011771号