123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- 'use strict';
-
- /* App Module */
-
- var app = angular.module('app', [
- 'ui.bootstrap',
- 'ui.router',
- 'LocalStorageModule',
- 'ngMaterial',
- 'ngMaterialDatePicker',
- 'appSdk'
- ]);
-
- app.config(['$stateProvider', '$urlRouterProvider', '$httpProvider', '$locationProvider',
- function($stateProvider, $urlRouterProvider, $httpProvider, $locationProvider) {
-
- //$locationProvider.html5Mode(true);
-
- $stateProvider.state('home',{
- url:'/',
- reloadOnSearch: false,
- templateUrl:'views/home.html',
- controller:'HomeController'
- });
-
- $stateProvider.state('freeroom',{
- url:'/freeroom',
- templateUrl:'views/freeroom.html',
- controller:'FreeRoomController'
- });
-
- $urlRouterProvider.otherwise('/');
-
- }])
- .directive('dateNow', ['$filter', function($filter) {
- return {
- link: function( $scope, $element, $attrs) {
- $element.text($filter('date')(new Date(), $attrs.dateNow));
- }
- };
- }])
- .run(['$rootScope', '$state', '$location', 'DataShareBusiness', 'GroupsBusiness', '$mdDateLocale', '$filter',
- function ($rootScope, $state, $location, DataShareBusiness, GroupsBusiness, $mdDateLocale, $filter) {
-
-
- var promiseLoadGroups = {
- id: "promiseLoadGroups",
- loaderGroups: ["toolbar"],
- groups: ["sidebar"]
- };
- GroupsBusiness.loadAll(promiseLoadGroups);
-
- $mdDateLocale.firstDayOfWeek = 1;
- $mdDateLocale.formatDate = function(date) {
- return $filter("date")(date, DataShareBusiness.DateFormat);
- };
- }]);
|