这是非常基本的,但我的视图文件夹(由lorum ipsum组成)中的 categories.view.html 未显示在容器div内。
这是HTML
<!DOCTYPE html>
<html lang="en" ng-app="kB">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Mwiki</title>
<!-- Bootstrap core CSS -->
<link href="bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="stylesheets/style.css" rel="stylesheet">
</head>
<body>
<nav class="navbar navbar-inverse">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Knowledgebase</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
</div><!--/.nav-collapse -->
</div>
</nav>
<div class="container">
<div ng-view></div>
</div>
<footer>
<p> © 2016 Wiki App</p>
</footer>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="bower_components/angular/angular.min.js"></script>
<script src="bower_components/angular-route/angular-route.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="controllers/articles.controller.js"></script>
<script src="controllers/categories.controller.js"></script>
<script src="app.js"></script>
</body>
</html>
这是app.js文件,它直接位于与我的index.html相同的文件夹中
var app = angular.module('kB', ['ngRoute']);
app.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/categories', {
templateUrl: 'views/categories.view.html',
controller: 'CategoriesCtrl'
});
}]);
.controller('CategoriesCtrl', [function($scope) {
console.log($scope);
}]);
答案 0 :(得分:0)
在配置功能之后删除分号(或在控制器之前添加应用程序)。还要确保注释。
Id1 Id2 CommonKey MinKey NewCommonKey
8 9 1 NULL 1
C D 2 2 2
X Y 3 2 2
Y Z 3 2 2
Z 1 3 2 2
1 A 3 2 2
A B 3 2 2
B 10 3 2 2
D 4 2 2 2
D B 2 2 2
B 10 2 2 2
9 J 1 NULL 1
J R 1 NULL 1
我没有对此进行过测试,但它应该有效。