https://plnkr.co/edit/JusdvujkGa3ZVBL5UPCY?p=preview
<html>
<head>
<base href="/">
<title>Angular QuickStart</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="bootstrap-4.0.0-alpha.5-dist/css/boostrap.min.css">
<!-- 1. Load libraries -->
<!-- Polyfill for older browsers -->
<script src="node_modules/core-js/client/shim.min.js"></script>
<script src="node_modules/zone.js/dist/zone.js"></script>
<script src="node_modules/reflect-metadata/Reflect.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script>
<!-- 2. Configure SystemJS -->
<script src="systemjs.config.js"></script>
<script>
System.import('app').catch(function(err){ console.error(err); });
</script>
</head>
<!-- 3. Display the application -->
<body>
<my-app>Loading...</my-app>
</body>
</html>
import { Component } from '@angular/core';
import {NgbModule} from '@ng-bootstrap/ng-bootstrap';
@Component({
selector: 'my-app',
template: `
<h1>Angular Router</h1>
<nav>
<a routerLink="/fullmonitor" routerLinkActive="active">Full monitor</a>
<a routerLink="/kpi" routerLinkActive="active">KPI </a>
</nav>
<router-outlet></router-outlet>
`
})
export class AppComponent { }
这是我创建的plunkr的链接。我正在尝试在角度2中创建一个导航栏,我正在使用ng-bootstrap在我的角度2应用程序中使用引导程序样式但是我无法在网页中加载任何内容它总是说加载....我做错了什么?
答案 0 :(得分:0)
我犯的错误是在app.module.ts导入中没有NgbModule!