如何啓用基於路徑的URL特定組件,基於路由的URL啓用組件
我有一個組件,如下這是在母版頁
app.component.html
<div class="col-md-7">
<headerBar ></headerBar>
</div>
<div class="col-md-4">
<fd-login></fd-login>
</div>
在該狀態下應用網址
示出了如下,
http://localhost:3000/en/search
我想隱藏標題欄,只有當應用程序處於上述其他狀態時纔會出現,我如何使用ngIf在html中檢查它,或者是否有替代方法?
這通常路由器做什麼。 –
https://angular.io/docs/ts/latest/tutorial/toh-pt5.html – Maxime
@GünterZöchbauer我不明白 – Sajeetharan