12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- 'use strict';
-
- /* App Module */
-
- var app = angular.module('app', [
- 'ui.bootstrap',
- 'ui.router',
- 'LocalStorageModule',
- 'ngAria',
- 'ngAnimate',
- 'ngMaterial',
- '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('thisweek',{
- url:'/thisweek',
- reloadOnSearch: false,
- templateUrl:'views/home.html',
- controller:'HomeController'
- });
-
- $urlRouterProvider.otherwise('/');
-
- }])
- .directive('dateNow', ['$filter', function($filter) {
- return {
- link: function( $scope, $element, $attrs) {
- $element.text($filter('date')(new Date(), $attrs.dateNow));
- }
- };
- }])
- .run(['$rootScope', '$state',function ($rootScope, $state) {
- $rootScope.$on('$stateChangeError', function (e, curr, prev) {
- //$state.go('/');
- });
- }]);
|