2
0
Fork 0
es5-ff-spa-loader/example/www_static/js/example-app.js

23 lines
1 KiB
JavaScript
Raw Normal View History

2015-12-23 00:16:54 +00:00
'use strict';
document.title = 'FF-Spa-Loader Example';
$('html').attr('ng-app', 'exampleUI');
$('html').attr('lang', 'en');
$(document.createElement('div')).attr('id', 'wrapper').appendTo($('body'));
$(document.createElement('div')).attr('ng-include', '\'/example-ui/thtml/layout/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', '\'/example-ui/thtml/layout/footer\'').appendTo($('body'));
var pageRouteInit = [];
angular.module('exampleUI', ['ngRoute']).
config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) {
for (var i = 0; i < pageRouteInit.length; i++) {
pageRouteInit[i]($routeProvider, $locationProvider);
}
$routeProvider.otherwise({ redirectTo: '/example-ui' });
$locationProvider.html5Mode({enabled: true, requireBase: false});
}]);