-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathjscript.js
27 lines (24 loc) · 909 Bytes
/
jscript.js
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
var myapp = angular.module('myapp', ['ngRoute']);
myapp.config(function ($routeProvider) {
$routeProvider
.when('/', {
templateUrl: 'home.html',
})
.when('/aboutme', {
templateUrl: 'aboutme.html',
controller: 'aboutmeController'
})
.when('/projects', {
templateUrl: 'projects.html',
controller: 'projectsController'
})
});
myapp.controller('templateController', function ($scope) {
$scope.message = 'Home Page';
});
myapp.controller('aboutmeController', function ($scope) {
$scope.message = 'About Me Page';
});
myapp.controller('projectsController', function ($scope) {
$scope.message = 'Project Page';
});