角<a> tag stop working when form is used

时间:2018-08-15 07:53:55

标签: angular

Basically i have made header and am calling that header in every page. but when i use form in body the tag in header stops working (not clickable).
Here is my header code:

iv class="main-panel">
    <nav class="navbar navbar-default navbar-fixed">
        <div class="container-fluid">                
                <div class="row" style="width:100%;">
                        <div class="col-xs-9 col-sm-9 col-md-9 col-lg-9"></div>
                        <div class="col-xs-1 col-sm-1 col-md-1 col-lg-1"><a routerLink="/abc"><p style="float:left;">Date</p></a></div>
                        <div class="col-xs-1 col-sm-1 col-md-1 col-lg-1"><a routerLink="/dummy"><p style="float:left;">Sometext</p></a></div>
                        <div class="col-xs-1 col-sm-1 col-md-1 col-lg-1"><a routerLink="/logout"><p style="float:left;">Log out</p></a></div>             
             </div>
        </div>
    </nav>

Now i call it using <app-header></app-header> in every page. But when i use form in that body the header links stop working.
Here is a picture before i use form


这是我使用表单后的图片

1 个答案:

答案 0 :(得分:0)

您可以在(根)appComponent.html中添加标头组件以在所有页面中呈现,然后创建一个单独的formComponet。