<html lang="en" >
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Angular Material required Libraries -->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular-route.min.js"></script>
<script>
var app = angular.module('route',['ngRoute']);
app.config(function($routeProvider){
$routeProvider
.when('/view1',
{
templateUrl:'view1.html',
})
.when('/view2',
{
templateUrl:'view2.html',
})
.when('/view3',
{
templateUrl:'view3.html',
})
});
</script>
</head>
<body ng-app="route">
<a href="#!view1"><input type="button" value="view 1"></a>
<a href="#!view2"><input type="button" value="view 2"></a>
<a href="#!view3"><input type="button" value="view 3"></a>
<ng-veiw></ng-veiw>
</body>
</html>
这是我要执行的代码,如果有人帮助我解决问题,我将不胜感激 这是我要执行的代码,如果有人帮助我解决问题,我将不胜感激