Angular2路由如何分离路由链接和HtmlPages加载

时间:2017-08-22 06:51:14

标签: html5 angular angular2-routing angular-cli

enter image description here这里我正在做Angular2路由当我在nva-bar中加载我的链接在同一个Html页面下也加载下请帮助我如何分开这两个

<nav>
<li> <a [routerLink]="['Employee/Add']" class="btn btn-primary btn-sm">Employee</a></li>
 <li> <a [routerLink]="['HrModule/Add']" class="btn btn-primary btn-sm">HrModule</a></li>
</nav>

<div>
    <router-outlet>

    </router-outlet>
</div>

AppComponent.ts

import { Component } from "@angular/core"
@Component({
    selector:"customer-ui",
    templateUrl:"../../templates/Master.html"
})
export class AppComponent {
}

0 个答案:

没有答案