
Angular
云墨cloudMel
程序员一枚,专注前端,
搞过vue, react, angular,node,
在进阶后端SpringBoot,
专注MySQL, MSSQL
展开
-
// Expression has changed after it was checked. Previous value: ‘ng-untouched: true‘. Current value:
ngAfterViewInit() { this.onSettingFormGroupChanged.next(this.settingsForm); // Expression has changed after it was checked. Previous value: 'ng-untouched: true'. Current value: 'ng-untouched: false // for (const control in this.setting...原创 2021-03-17 07:30:20 · 1065 阅读 · 0 评论 -
angular <pre></pre>解析
<h2 class="title">Hello {{name}}</h2><style> div { margin: 20px 10px; }</style><h1>Hello</h1><form [formGroup]="myForm" (ngSubmit)="onSubmit()"> <div> <select formControlName="status" (chang...转载 2021-02-23 08:58:09 · 439 阅读 · 0 评论 -
2021-02-22 ng-select ngModel 绑定Object 在数组中的应用
import { Component } from '@angular/core';@Component({ selector: 'nz-demo-select-label-in-value', template: ` <p>The selected option's age is {{ selectedValue?.age }}</p> <br /> <nz-select [(ngModel)]="selectedValu...原创 2021-02-22 20:03:14 · 758 阅读 · 0 评论 -
Angular 光标指向定位
import { Component, ElementRef, ViewChild, AfterContentInit } from '@angular/core';@Component({ selector: 'custom-form', template: ` <form> <input placeholder="Name" #nameInput /> </form> `}).原创 2021-02-17 15:03:54 · 785 阅读 · 0 评论 -
Angular Property ‘refreshAll‘ does not exist on type ‘{ value: any; }‘.
showDrawer(id): void { const title = 'Order Details Info'; const width = ''; const dataInfo = id; this.selectedId = id; const drawerTemplate = OrderDetailDrawerVComponent; const drawerRef = this.utilService.openDrawerService(tit...原创 2021-02-11 07:28:28 · 398 阅读 · 0 评论 -
Angular Form Valid Status Monitor
ngOnInit(): void { this.validateForm = this.formBuilder.group({ from_name: ['', Validators.required], from_companyName: [''], from_email: ['', [Validators.pattern(this.emailRegex), Validators.maxLength(49)]], from_phone: [''],..原创 2020-10-28 20:20:08 · 228 阅读 · 0 评论 -
Angular ng-zorro, 合并相同列数据
先贴图为敬,源码参考:import { Component } from '@angular/core';@Component({ selector: 'nz-demo-table-colspan-rowspan', template: ` <nz-table #colSpanTable [nzData]="tableData" nzBordered> <thead> <tr> <..转载 2020-10-07 14:45:59 · 1318 阅读 · 0 评论 -
Angular [formcontrol] and formcontrolname区别
https://angular.cn/api/forms/FormControlName#register-formcontrol-within-a-grouphttps://angular.cn/api/forms/FormControl settingsForm = new FormGroup({ pickupDate: new FormControl(), hoursTime: new Form.原创 2020-09-23 19:31:12 · 1054 阅读 · 0 评论 -
Angular Material Input Required
添加出多行Input, 解决点击一出, 多行显示校验问题 <div fxFlex="100" fxLayout="row" fxLayoutAlign="space-between center" fxFlex="1 0 auto" *ngFor="let _package of getControls(consignment, 'packages'); let x = index"> <div formGroupName="{{x}}" fxFlex="10.原创 2020-07-02 09:12:02 · 521 阅读 · 0 评论 -
Angular 父组件传值给子组件, ngOnChanges only fire once
只有父组件传值变化时, 子组件的ngOnChanges()才会触发changeFromParent() will call ngOnChanges()https://www.stackchief.com/blog/ngOnChanges%20Example%20%7C%20Angular原创 2020-06-12 10:28:38 · 307 阅读 · 0 评论 -
Angular input延迟防抖debounceTime
import {Component, OnInit} from '@angular/core';import {AbstractControl, FormBuilder, FormGroup, Validators} from '@angular/forms';import {ActivatedRoute, Router} from '@angular/router';import {RegisterService} from './register.service';import {Transl.原创 2020-05-27 20:09:26 · 902 阅读 · 0 评论 -
Angular 声明对象, 指定合适的类型
// selectedSuburbItem:Object; // selectedSuburbItem:Object = { // suburb: "", // postcode: "", // state: "" // } // selectedSuburbItem:any = { // suburb: "", // postcode: "", // state...原创 2020-05-27 20:02:30 · 1425 阅读 · 0 评论 -
mat-checkbox is not a known element
'mat-checkbox' is not a known element:1. If 'mat-checkbox' is an Angular component, then verify that it is part of this module.2. If 'mat-checkbox' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to sup原创 2020-05-19 15:15:11 · 1016 阅读 · 0 评论 -
Angular组件传值
父组件传给子组件, 可以传data, function, self自身父组件<app-header [title]="title" [msg]="msg" [run]="run" [home]="this"></app-header><div> <p>home</p></div>子组件/* * @Author : G.F * @Date : 2020-05-13 20:4.原创 2020-05-17 09:34:25 · 357 阅读 · 0 评论