forked from doowb/angular-pusher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
32 lines (24 loc) · 983 Bytes
/
app.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
/**
@toc
1. setup - whitelist, appPath, html5Mode
*/
'use strict';
var staticPath = (window.location.host.indexOf('doowb.github') > -1) ? '/angular-pusher/' : '/';
angular.module('myApp', [
'ngRoute', 'ngSanitize', 'ngTouch', //additional angular modules
'ngAnimate',
'doowb.angular-pusher'
]).
config(['$routeProvider', '$locationProvider', '$compileProvider', 'PusherServiceProvider',
function($routeProvider, $locationProvider, $compileProvider, PusherServiceProvider) {
$locationProvider.html5Mode(false);
var appPathRoute ='/';
var pagesPath =staticPath+'pages/';
$routeProvider.when(appPathRoute+'home', {templateUrl: pagesPath+'home/home.html'});
$routeProvider.when(appPathRoute+'items', {templateUrl: pagesPath+'items/items.html'});
$routeProvider.otherwise({redirectTo: appPathRoute+'items'});
PusherServiceProvider
.setToken('d420162e600c57b0e60f')
.setOptions({});
}
]);