-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
executable file
·58 lines (51 loc) · 1.27 KB
/
app.js
File metadata and controls
executable file
·58 lines (51 loc) · 1.27 KB
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
50
51
52
53
54
55
56
57
58
var app=angular.module('myapp',['ngRoute']);
app.config(function($routeProvider,$locationProvider){
$locationProvider.hashPrefix('');
$routeProvider
.when('/aboutme',{
templateUrl: 'aboutme.html',
controller: "aboutmeCtrl"
})
.when('/vb',{
templateUrl: 'vb.html',
controller: "vbCtrl"
})
.when('/games',{
templateUrl: 'games.html',
controller: "gameCtrl"
})
.when('/others',{
templateUrl: 'others.html',
controller: "othersCtrl"
})
.when('/',{
template: '',
controller: "myCtrl"
});
});
app.controller('myCtrl',function($scope,$rootScope){
$rootScope.caro=true;
}
);
app.controller('aboutmeCtrl',function($scope,$rootScope){
console.log("aboutme called");
$rootScope.caro=false;
}
);
app.controller('vbCtrl',function($scope,$rootScope){
$rootScope.caro=false;
}
);
/*app.controller('homeCtrl',function($scope,$rootScope){
console.log("home called");
$rootScope.caro=true;
}
);*/
app.controller('gameCtrl',function($scope,$rootScope){
$rootScope.caro=false;
}
);
app.controller('othersCtrl',function($scope,$rootScope){
$rootScope.caro=false;
}
);