-
Notifications
You must be signed in to change notification settings - Fork 523
/
index.html
49 lines (39 loc) · 1.34 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!-- <!DOCTYPE html>
<html ng-app="myApp">
<head>
<title>AngularJS Routing Example</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.7.9/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.7.9/angular-route.min.js"></script>
</head>
<body>
<h1>AngularJS Routing Example</h1>
<ul>
<li><a href="#/login">Login</a></li>
<li><a href="#/register">Register</a></li>
</ul>
<div ng-view></div>
<script>
var app = angular.module("myApp", ["ngRoute"]);
app.config(function($routeProvider) {
$routeProvider
.when("/login", {
templateUrl: "login.html",
controller: "LoginController"
})
.when("/register", {
templateUrl: "register.html",
controller: "RegisterController"
})
.otherwise({
redirectTo: "/register"
});
});
app.controller("LoginController", function($scope) {
$scope.message = "Login Page";
});
app.controller("RegisterController", function($scope) {
$scope.message = "Register Page";
});
</script>
</body>
</html> -->