Semaphore/public/js/semaphore.js

40 lines
877 B
JavaScript
Raw Normal View History

2014-08-24 19:36:34 +02:00
require.config({
paths: {
angular: '../vendor/angular/angular.min',
uiRouter: '../vendor/angular-ui-router/release/angular-ui-router.min',
jquery: '../vendor/jquery/dist/jquery.min',
moment: '../vendor/moment/moment',
bootstrap: '../vendor/bootstrap/dist/js/bootstrap.min',
2014-08-26 00:58:09 +02:00
couchPotato: '../vendor/angular-couch-potato/dist/angular-couch-potato',
socketio: '/socket.io/socket.io.js'
2014-08-24 19:36:34 +02:00
},
shim: {
angular: {
exports: 'angular'
},
uiRouter: {
deps: ['angular']
},
2014-08-26 00:58:09 +02:00
bootstrap: ['jquery'],
socketio: {
exports: 'io'
}
2014-08-24 19:36:34 +02:00
}
});
require([
'jquery',
'angular',
'couchPotato',
'uiRouter',
'app',
'routes/routes'
], function($, angular) {
var $html = angular.element(document.getElementsByTagName('html')[0]);
require(['bootstrap'], function () {});
2014-08-24 19:36:34 +02:00
angular.element().ready(function() {
angular.bootstrap($html, ['semaphore'])
});
});