blog icon indicating copy to clipboard operation
blog copied to clipboard

没事写写文章,喜欢的话请点star,想订阅点watch,千万别fork!

Results 59 blog issues
Sort by recently updated
recently updated
newest added

# 开博客了 > 2017开始在Github写博客,记录工作总结,学习经验。 ## 2017计划 > 2017计划2个开源项目。 1. 仿简书nodejs+express+mongodb+vue2+angular2([链接](https://github.com/jiayisheji/jianshu)) 2. 计划翻译一本英文书《[Eloquent JavaScript](http://eloquentjavascript.net/)》,也算对自己学英语一个检验。

> 构建一个功能齐全的自定义表单控件,兼容模板驱动和响应式表单,以及所有内置和自定义表单验证器。 [Angular Forms](https://github.com/angular/angular/blob/main/packages/forms) 提供 `FormsModule` 和 `ReactiveFormsModule` 模块自带了一系列内置指令,这些指令使得将标准 `HTML` 表单元素(如 `input`、`select`、`textarea`等)绑定到表单组变得非常简单。 除了这些标准的 `HTML` 表单元素,我们可能还想使用自定义表单控件,比如下拉框、选择框、切换按钮、滑块或许多其他类型的常用自定义表单组件。 在本文中,我们将学习如何使用现有的自定义表单控件组件,并使其与 `Angular Forms API` 完全兼容,以便该组件能够参与父表单验证和值跟踪机制。 这意味着: - 如果我们使用的是模板驱动表单,我们就可以通过使用 `ngModel` 把自定义组件插入到表单中 - 在响应式表单中,我们可以使用 `formControlName` 或 `formControl`...

Angular

Bumps [minimist](https://github.com/minimistjs/minimist) from 1.2.5 to 1.2.8. Changelog Sourced from minimist's changelog. v1.2.8 - 2023-02-09 Merged [Fix] Fix long option followed by single dash [#17](https://github.com/minimistjs/minimist/issues/17) [Tests] Remove duplicate test [#12](https://github.com/minimistjs/minimist/issues/12) [Fix]...

dependencies

![image](https://user-images.githubusercontent.com/6111778/217979693-f88ccd47-2b8f-4f53-8d54-47dbd87c127b.png) 去年圣诞节格外冷,第二天要上班,早早洗洗睡了。半夜 10 点,老板打电话来说有个推广页要换谷歌代码。跟他说明天早上去了,就去改。凌晨 0 点,又打电话来了,说还需要审核几个小时。事不过三,这哪能拒绝了,穿好衣服爬起来,开了电脑远程公司(疫情以来,公司电脑没有关过,长年开机候命)。下载老板给的代码,找到对应的项目,一看不知道,一看吓一跳,20 多个页面了。推广页面,比较简单,一开始才就 1,2 个页面,交给其他同事负责完成。改了代码提交发布一气呵成,前后不到 10 分钟。 ## 破局 看到项目膨胀,到公司咨询一下推广和运维,还有负责项目的同事。目前这个推广项目页面会越来越多,还是有些重复,现在是按推广域名和推广页面文件夹挂钩,都在一个 `git` 仓库里,每次提交代码发布都是整个项目一起发布。开发只需要把代码提交 `git` 仓库即可,剩下交给运维处理发布问题。 由于都是静态文件,里面包含一些谷歌等推广协议相关页面,为了应对审核,这些协议修改也是常有事情,在编辑器可以批量替换,这可能导致错误。为了安全起见只能一个一个替换。这种方式在当前现代前端工业化水平,那相当原始钻木取火水平。想要改变就要破局,话不多说,进入正题。 ## 思考 先看项目结构: ```tree ---- root | | |-- .git |...

Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1. Commits 2449650 Update mocha 560b2d8 Don't use regex to trim whitespace b1bdb92 Remove linting package zoo c20dc7e Cache 308 See full diff in compare...

dependencies

Bumps [express](https://github.com/expressjs/express) from 4.17.1 to 4.18.2. Release notes Sourced from express's releases. 4.18.2 Fix regression routing a large stack in a single route deps: [email protected] deps: [email protected] perf: remove unnecessary...

dependencies

Bumps [qs](https://github.com/ljharb/qs) from 6.5.2 to 6.5.3. Changelog Sourced from qs's changelog. 6.5.3 [Fix] parse: ignore __proto__ keys (#428) [Fix] utils.merge: avoid a crash with a null target and a truthy...

dependencies

Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2. Release notes Sourced from decode-uri-component's releases. v0.2.2 Prevent overwriting previously decoded tokens 980e0bf https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2 v0.2.1 Switch to GitHub workflows 76abc93 Fix issue where decode...

dependencies

Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2. Commits 699c459 3.1.2 2f2b5ff fix: trim pattern 25d7c0d 3.1.1 55dda29 fix: treat nocase:true as always having magic 5e1fb8d 3.1.0 f8145c5 Add 'allowWindowsEscape' option 570e8b1...

dependencies