發表文章

目前顯示的是 2022的文章

[Git] 檔案路徑過長導致git無法儲存解法

  让 git 支持长文件名_徐晓伟的博客-CSDN博客 https://blog.csdn.net/qq_32596527/article/details/105799844 cmd 运行(需要将 git 添加到环境变量中): git config --global core.longpaths true 如果是Windows 10,还需要通过注册表或组策略,解除操作系统的文件名长度限制(需要重启,以下方式二选一): 在注册表编辑器中创建HKLM\SYSTEM\CurrentControlSet\Control\FileSystem LongPathsEnabled, 类型为REG_DWORD,并设置为1。 或者从系统菜单点击设置图标,输入“编辑组策略”, 然后在打开的窗口依次进入“计算机管理” > “管理模板” > “系统” > “文件系统”,在右侧双击“启用 win32 长路径”。 ———————————————— 版权声明:本文为CSDN博主「徐晓伟」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/qq_32596527/article/details/105799844

[Angular] 使用ngForTrackBy 來提升*ngFor的效能

  詳細文章 https://dotblogs.com.tw/explooosion/2017/04/29/035512 用法 < li * ngFor = "let item of items ; trackBy:trackByFn ; let i=index" > {{i}} - {{ item.name }} </ li > trackByFn(index, item) { return index; // or item.name }

[Angular] 在Angular 12版後,嚴格模式的寫作方式及常見錯誤處理

  https://fullstackladder.dev/blog/2021/06/21/how-to-survive-in-angular-12-strict-mode-using-async-pipe/

[Angular] 在.ts裡面使用pipe的功能

  https://stackoverflow.com/questions/35159079/is-it-possible-to-use-a-pipe-in-the-code First declare the pipe in the  providers  of your module: import { YourPipeComponentName } from 'your_component_path'; @NgModule({ providers: [ YourPipeComponentName ] }) export class YourServiceModule { } Then you can use  @Pipe  in a component like this: import { YourPipeComponentName } from 'your_component_path'; class YourService { constructor(private pipe: YourPipeComponentName) {} YourFunction(value) { this.pipe.transform(value, 'pipeFilter'); } }

[Angular] 將日期格式用內建的DatePipe轉成自定義的string格式

https://stackoverflow.com/questions/40377103/how-to-convert-date-into-this-yyyy-mm-dd-format-in-angular-2 component.ts   constructor (       public datepipe : DatePipe ,   ) {} function(){   // 日期轉換     const ConvertedDate = this . datepipe . transform (       this . myForm . controls . myDate . value ,       ' yyyyMMdd ' ,     ) ; } 其中 'yyyyMMdd' 可以自訂為其他格式 像是 'yyyy/MM/dd' 之類的 就會輸出 2022/08/23 app.module.ts import { DatePipe } from ' @angular/common ' ;   providers : [      DatePipe ,   ] ,

[Angular 文章材料留存]

  https://ithelp.ithome.com.tw/users/20090728/ironman/1600 https://ithelp.ithome.com.tw/users/20140093/ironman/3909 https://ithelp.ithome.com.tw/users/20140183/ironman/3996 https://ithelp.ithome.com.tw/users/20140664/ironman/4207 https://ithelp.ithome.com.tw/users/20093270/ironman/4623 https://ithelp.ithome.com.tw/users/20128395/ironman/4876 https://ithelp.ithome.com.tw/users/20124767/ironman/3894 https://ithelp.ithome.com.tw/users/20124767/ironman/3894

[Angular Material] 讓matTable可以一行顯示多列

    < table mat - table [ dataSource ] = " dataSourceSeal " matSort >           < ! -- businessType Column -->           < ng - container matColumnDef = " businessType " >             < th mat - header - cell * matHeaderCellDef > 業務別 < / th >             < td               mat - cell               * matCellDef = " let element ; let i = index "               [ attr . rowspan ] = " getRowSpan ( ' businessType ' , i ) "               [ style . display ] = " getRowSpan ( ' businessType ' , i ) ? i : ''"             >               {{ element . businessType }}             < / td > ...