Repository navigation
Expand file tree
/
Copy pathapp.js
More file actions
64 lines (45 loc) · 1.45 KB
/
Copy pathapp.js
File metadata and controls
64 lines (45 loc) · 1.45 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
59
60
61
62
63
64
var module = angular.module("app", ['ngRoute']);
module.config(['$routeProvider', '$locationProvider',
function($routeProvider,$locationProvider) {
$routeProvider.
when('/start/simplemvc', {
templateUrl: 'start/simplemvc.html',
controller: 'RouteController'
}).
when('/start/simplemysql', {
templateUrl: 'start/simplemysql.html',
controller: 'RouteController'
}).otherwise({
});
//$locationProvider.hashPrefix('!');
/*
otherwise({
redirectTo: '/'
});
*/
$locationProvider.hashPrefix("#");
}]);
module.controller("RouteController", function($scope) {
$scope.$on('$viewContentLoaded', function(){
Prism.highlightAll();
setTimeout(function(){
$('[data-spy="scroll"]').each(function () {
var $spy = $(this).scrollspy('refresh')
});
$('.bs-docs-sidebar').affix({offset:{top:160}});
},100);
});
});
$(function(){
/*
setTimeout(function(){
if($('.bs-docs-sidebar').length)
{
$('body').scrollspy({
target: '.bs-docs-sidebar'
});
$('.bs-docs-sidebar').data('spyloaded',1);
}
},1000);
*/
});