8. AngularJS
User Group Taiwan
樣板 指令 Alias 用法
Module ng g m my-module
Component ng g c my-new-component
Directive ng g d my-new-directive
Service ng g s my-new-service
Pipe ng g p my-new-pipe
Guard ng g g my-new-guard
Enum ng g e my-new-enum
Interface ng g i my-new-interface
Class ng g cl my-new-class
使用 Alias 快速建立元件
9. AngularJS
User Group Taiwan
--build-optimizer (Angular Build Optimizer)
• 可大幅減少 Bundle 後的檔案大小 (專案越大越明顯)
• 目前為實驗性功能 (需額外加上 --build-optimizer 選項)
• 建置過程會比 --prod 多出一倍時間
--named-chunks feat(@angular/cli): name lazy
• 讓延遲載入的子路由模組可用「模組名稱」當成檔名
• 預設在 dev 環境就是啟用的
• 這是 webpack v2.4.0 的新功能
關於 --dev 與 --prod builds 的預設值
• --dev vs --prod builds
體驗最新最酷的建置功能 ( ng build )
35. AngularJS
User Group Taiwan
http://angular.tw (Angular User Group Taiwan)
https://forum.angular.tw/ ( 台灣 Angular 技術論壇 )
Angular Extension Pack - Visual Studio Marketplace
Angular Best Practices - August 2017 Edition
Optimizing the Performance of Your Angular Apps
Best Practices - STEPHEN FLUIN - YouTube
angular-cli/build.md at 1.3.x · angular/angular-cli
相關連結
37. AngularJS
User Group Taiwan
The Will Will Web
記載著 Will 在網路世界的學習心得與技術分享
• http://blog.miniasp.com/
Will 保哥的技術交流中心 (臉書粉絲專頁)
• http://www.facebook.com/will.fans
Will 保哥的噗浪
• http://www.plurk.com/willh/invite
Will 保哥的推特
• https://twitter.com/Will_Huang
聯絡資訊
Default
Default means that the change detector’s mode will be set to CheckAlways during hydration.
OnPush
OnPush means that the change detector’s mode will be set to CheckOnce during hydration.
The problem is, because Angular needs to re-run your function in every change detection cycle, if the function performs expensive tasks, it can be costly.
Angular Guide - Pipes
https://angular.io/guide/pipes
The problem is, because Angular needs to re-run your function in every change detection cycle, if the function performs expensive tasks, it can be costly.
Angular Guide - Pipes
https://angular.io/guide/pipes