我正在制作angular2应用程序 . 我在主页路线中登录了bootstrap的模态弹出窗口 . 我正在实施其他路线的守卫 . 当防护指定用户未登录时,我想将用户重定向到弹出登录 . 我在主页或根路由中有以下弹出登录代码:

<div class="account-modal modal fade" tabindex="-1" role="dialog" id="myModal" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
    <div class="modal-content">
        <div class="modal-body custom-modal-body">
            <form>
                <label for="username">Username</label>
                <input type="text" name="username"/>
                <label for="password">Password</label>
                <input type="password"> name="password">
                <input type="submit" value="login"/>
            </form>
        </div>
    </div>
</div>

现在我要做的是使用路由器在auth guard中的导航功能导航到弹出窗口,即:

this.router.navigate(['/']); //there should be link to the popup login

但我无法将其指向上述模态类 .

任何人都可以帮我如何使用路由器的导航将网址指向模态弹出窗口?