随笔分类 -  常用

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