2
0
Fork 0
es5-ff-spa-loader/example/www_static/js/example-app.js
2016-01-14 22:42:13 +01:00

23 lines
1 KiB
JavaScript

'use strict';
document.title = 'FF-Spa-Loader Example';
var serverUrl = window.FFServerUrl;
console.log('FF provided serverUrl: '+serverUrl);
$(document.createElement('div')).attr('id', 'wrapper').appendTo($('body'));
$(document.createElement('div')).attr('ng-include', '\''+serverUrl+'/example-ui/thtml/header\'').appendTo($('#wrapper'));
$(document.createElement('div')).attr('id', 'page-wrapper').appendTo($('#wrapper'));
$(document.createElement('div')).attr('id', 'container-fluid').attr('ng-view', '').appendTo($('#page-wrapper'));
$(document.createElement('div')).attr('ng-include', '\''+serverUrl+'/example-ui/thtml/footer\'').appendTo($('body'));
var pageRouteInit = [];
angular.module('exampleUI', ['ngRoute']).config(
['$routeProvider', '$locationProvider', function
($routeProvider, $locationProvider) {
pageRouteInit.forEach(function(init) { init($routeProvider, $locationProvider); });
$routeProvider.otherwise({ redirectTo: '/example-ui' });
$locationProvider.html5Mode({enabled: true, requireBase: false});
}]);