Skye - TechBlog

Blog yourself


  • 首頁

  • 歸檔

Angular Directive & Component input / output design pattern

發表於 2021-08-05

來聊聊 Component 與 Directive 以及其 input / output 設計模式

閱讀全文 »

Bitwise 狀態設計模式

發表於 2021-07-26

如何用 bitwise 來做到 True / False 這類的邏輯控制呢?

閱讀全文 »

Angular @Optional, @Self, @SkipSelf, @Host

發表於 2021-07-23

我們這次來介紹"我"不常用的 inject decorator

@Optional, @Self, @SkipSelf, @Host

閱讀全文 »

FormControl 值的流向與變化

發表於 2021-07-20

你知道 value 在 FormControl 中是怎麼流動的嗎? 讓我們一步步的追蹤值的流向與變化吧

閱讀全文 »

米家到貨通知啦

發表於 2021-07-19

原本就常常缺貨的小米, 又趕上 COVID-19 全民在家運動, 想買幾瓶 "米家自動感應洗手機"

缺貨! 缺貨!! 大缺貨!!!

閱讀全文 »

這年頭買張顯示卡有這麼難?

發表於 2021-07-19

電腦壞掉又遇到礦災, 不就是要買張顯卡而已, 有沒有這麼難買…

閱讀全文 »

Angular forwardRef 所謂何事?

發表於 2021-07-16

在 Angular 中常常會看到各式各樣的教學文, 其中有個字眼不會常常看, 也不會常常寫, 那就是 forwardRef.

閱讀全文 »

Angular style component host 與封裝對照

發表於 2021-07-09
什麼是 :host(selector) ?

在 Angular component 中的樣式, 基本上會被 Shadow dom 所隔離, 在 Shadow dom 之中才會是 template 的內容.

樣式中的 host 其實就是指向 Shadow dom, 也就是在父層 template 中所呼叫的 component tag.

一般會將樣式寫在 template 上而不會對 host 進行太多的定義.

那什麼時候會需要將樣式定義在 host 上呢?

Shadow dom 的大小基本上是由其中的 template 所決定, 但是如果要對這個 component 有較精準的定位或相對位置計算等空間排版的需求時, 會需要將 host 定義 display 屬性

閱讀全文 »

遍歷非同步的方式記錄

發表於 2021-07-05

一般在使用 loop 的時候會習慣用到 for…of, array forEach …etc, 如果在這些程式碼段裡須搭配非同步(async)的時候會遇到一些問題

例如: 加了 async/await 沒有作用…

閱讀全文 »

Hexo Theme 排行榜

發表於 2021-06-22

一開始只是想找個 hexo theme 來當作 Blog 的模板, 在網上看到有人針對 Github 星數的排行.

想說乾脆我也來用一個排行的文章, 剛好當作 blog 的一篇文章, 沒想到做著做著遇到好多沒碰過的東西, 原來給自己找了個苦差事呢.

閱讀全文 »

10 文章
RSS
GitHub
© 2022 Skye Wu
由 Hexo 強力驅動
|
主題 — NexT.Muse v5.1.4