---
# System prepended metadata

title: Angular Q & A
tags: ['Angular ', ' FrontEnd']

---

---
title: Angular Q & A
tags: Angular , FrontEnd
---

# Angular Q & A

* 建立新的 Component 及 Module 時，記得要export Module，並於 appModule (專案的 Root Module )中 import，否則一般頁面顯示正常，但使用到套件之功能 (如: Router, Material等)時，會報錯。
* [變數後!的用意 (varible!: Varible) - 確認varible不為null或undefined時告知TS用](https://stackoverflow.com/questions/50983838/what-does-mean-in-typescript/50984662)
* [變數後?的用意 (varible?: Varible) - 使varible成為optional (類似Java Option型別)](https://stackoverflow.com/questions/23557030/what-does-mean-in-typescript)
* [?. - 可選串連運算子](https://developer.mozilla.org/zh-TW/docs/Web/JavaScript/Reference/Operators/Optional_chaining)