<!DOCTYPE html>
<html ng-app="routeModule">
<head>
<meta charset="utf-8">
<script src="../angular-1.6.6/angular.min.js"></script>
<link rel="stylesheet" href="../bootstrap-3.3.7-dist/css/bootstrap.min.css">
<link rel="stylesheet" href="../bootstrap-3.3.7-dist/css/bootstrap-theme.css">
<script src="../jquery/jquery-3.2.1.min.js"></script>
<script src="../angular-1.6.6/angular-route.js"></script>
<script type="text/javascript">
var routeModule = angular.module('routeModule', ['ngRoute']);
routeModule.config(['$routeProvider',
function ($routeProvider) {
$routeProvider.
when('/addOrder', {
templateUrl: 'templates/add-order.html',
controller: 'AddOrderController'
}).
when('/showOrders', {
templateUrl: 'templates/show-order.html',
controller: 'ShowOrderController'
}).
otherwise({
redirectTo: '/addOrder'
});
}]);
</script>
<style type="text/css">
.mainDiv {
margin: 25px 50px 75px 100px
}
</style>
</head>
<body>
<div class="mainDiv">
<ul class="nav nav-tabs">
<li><a href="#/showOrders"><span class="glyphicon glyphicon-th-list"></span>订单列表</a></li>
<li><a href="#/addOrder"><span class="glyphicon glyphicon-plus"></span>新增订单</a></li>
</ul>
<div ng-view></div>
</div>
</body>
</html>
- 3 回答
- 0 关注
- 1580 浏览
添加回答
举报
0/150
提交
取消