-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
37 lines (30 loc) · 842 Bytes
/
script.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
28
29
30
31
32
33
34
35
36
37
var scotchApp = angular.module('droneApp', ['ngRoute']);
// configure our routes
scotchApp.config(function($routeProvider) {
$routeProvider
//home page
.when('/', {
templateUrl : 'pages/home.html',
controller : 'mainController'
})
//about page
.when('/about', {
templateUrl : 'pages/about.html',
controller : 'aboutController'
})
//contact page
.when('/contact', {
templateUrl : 'pages/contact.html',
controller : 'contactController'
});
});
// create the controller
scotchApp.controller('mainController', function($scope) {
$scope.message = 'This is page 1';
});
scotchApp.controller('aboutController', function($scope) {
$scope.message = 'This is page 2';
});
scotchApp.controller('contactController', function($scope) {
$scope.message = 'This is page 3';
});