You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

app.js 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. 'use strict';
  2. /* App Module */
  3. var app = angular.module('app', [
  4. 'ui.bootstrap',
  5. 'ui.router',
  6. 'LocalStorageModule',
  7. 'ngAria',
  8. 'ngAnimate',
  9. 'ngMaterial',
  10. 'appSdk'
  11. ]);
  12. app.config(['$stateProvider', '$urlRouterProvider', '$httpProvider', '$locationProvider',
  13. function($stateProvider, $urlRouterProvider, $httpProvider, $locationProvider) {
  14. //$locationProvider.html5Mode(true);
  15. $stateProvider.state('home',{
  16. url:'/',
  17. reloadOnSearch: false,
  18. templateUrl:'views/home.html',
  19. controller:'HomeController'
  20. });
  21. $urlRouterProvider.otherwise('/');
  22. }])
  23. .directive('dateNow', ['$filter', function($filter) {
  24. return {
  25. link: function( $scope, $element, $attrs) {
  26. $element.text($filter('date')(new Date(), $attrs.dateNow));
  27. }
  28. };
  29. }])
  30. .run(['$rootScope', '$state',function ($rootScope, $state) {
  31. $rootScope.$on('$stateChangeError', function (e, curr, prev) {
  32. //$state.go('/');
  33. });
  34. }]);