-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathapp.js
More file actions
95 lines (83 loc) · 2.22 KB
/
app.js
File metadata and controls
95 lines (83 loc) · 2.22 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
'use strict';
// Declare app level module which depends on filters, and services
angular.module('site', [
'ngRoute',
// 'ui.bootstrap',
'site.filters',
'site.services',
'site.directives',
'site.controllers',
'jm.i18next'
]).config(['$routeProvider', '$locationProvider',
function($routeProvider, $locationProvider) {
$routeProvider
.when('/about', {
templateUrl: 'partials/about.html',
controller: 'AboutCtrl',
resolve: {}
})
.when('/', {
templateUrl: 'partials/main.html',
controller: 'LandingCtrl',
resolve: {}
})
.otherwise('/');
$locationProvider.html5Mode(false);
}
]).filter('t', ['$i18next', function(i18next) {
return function(input) {
return i18next(input);
}
}]);
angular.module('jm.i18next')
.config(['$i18nextProvider', function($i18nextProvider) {
$i18nextProvider.options = {
useCookie: false,
useLocalStorage: false,
load: 'current',
fallbackLng: 'zh-TW',
resGetPath: '../locales/__lng__/__ns__.json',
ns: {
namespaces: ['site_main'],
defaultNs: 'site_main'
}
};
// http://localhost:8005/?setLng=en/
}]);
angular.module('site.controllers', ["ngSanitize", "angular-lifestream"]).controller(
'lifestreamCtrl', ['$scope',
function($scope) {
$scope.lifestreamConfig = {
theme: "lifestream-light-theme",
list: [{
service: "github_org",
user: "code4hk",
}, {
service: "twitter",
user: "code4hk"
}, {
service: "facebook_page",
user: "code4hk"
}]
};
}
])
.controller('LandingCtrl', ['$scope', '$location', '$anchorScroll',
function($scope, $location, $anchorScroll) {
$scope.goTo = function(hash) {
console.log('hash=' + hash);
$location.hash(hash);
$anchorScroll();
};
}
])
.controller('ActivitiesCtrl', ['$scope', '$location',
function($scope, $location) {
}
])
.controller('AboutCtrl', ['$scope', '$location',
function($scope, $location) {}
]);
angular.element(document).ready(function() {
angular.bootstrap(document, ["site"]);
});