angular在IE下有時會報object doesn't support property or method matches問題
同時,在router-outlet切換時,不刪除原組件而是添加一個新組件,並將原組件擠到<router-outlet></router-outlet>下方
在polyfill.ts文件中添加如下代碼,即可解決上如題所述兩個問題。
if (!Element.prototype.matches) {
Element.prototype.matches = Element.prototype.msMatchesSelector;
}