Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

app.js 3.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. 'use strict';
  2. /* App Module */
  3. angular.module('app', [
  4. 'ui.bootstrap',
  5. 'ui.router',
  6. 'LocalStorageModule',
  7. 'ngMaterial',
  8. 'md.data.table',
  9. 'sasrio.angular-material-sidenav',
  10. 'luticate2Utils',
  11. // 'luticateAuth',
  12. 'appSdk'
  13. ])
  14. .config(['$stateProvider', '$urlRouterProvider', 'ssSideNavSectionsProvider', '$mdThemingProvider', '$mdIconProvider',
  15. function($stateProvider, $urlRouterProvider, ssSideNavSectionsProvider, $mdThemingProvider, $mdIconProvider) {
  16. // $mdThemingProvider
  17. // .theme('default')
  18. // .primaryPalette('blue', {
  19. // 'default': '700'
  20. // });
  21. $mdIconProvider
  22. .icon('md-toggle-arrow', 'img/arrow.svg') ;
  23. ssSideNavSectionsProvider.initWithTheme($mdThemingProvider);
  24. ssSideNavSectionsProvider.initWithSections([{
  25. id: 'toogle_1',
  26. name: 'Home',
  27. type: 'heading',
  28. children: [{
  29. name: 'Home 1',
  30. type: 'toggle',
  31. pages: [{
  32. id: 'toogle_1_link_1',
  33. name: 'Home 1 1',
  34. state: 'home'
  35. }, {
  36. id: 'toogle_1_link_2',
  37. name: 'Home 1 2',
  38. state: 'home.1.2',
  39. hidden: true
  40. }, {
  41. id: 'toogle_1_link_3',
  42. name: 'Home 1 3',
  43. state: 'home.1.3'
  44. }]
  45. }]
  46. }, {
  47. id: 'link_1',
  48. name: 'Home 2 ',
  49. state: 'home.2',
  50. type: 'link',
  51. icon: 'fa fa-check'
  52. }, {
  53. id: 'link_2',
  54. name: 'Home 3',
  55. state: 'home.3',
  56. type: 'link'
  57. }, {
  58. id: 'link_3',
  59. name: 'Link 3',
  60. state: 'common.link3',
  61. type: 'link',
  62. hidden: true
  63. }, {
  64. id: 'toogle_2',
  65. name: 'PkGuid',
  66. type: 'heading',
  67. children: [{
  68. name: 'PkGuid 1',
  69. type: 'toggle',
  70. pages: [{
  71. id: 'toogle_2_link_1',
  72. name: 'PkGuid 1 1',
  73. state: 'pkguid'
  74. }]
  75. }]
  76. }]);
  77. $stateProvider.state('root', {
  78. abstract: true,
  79. template: '<div ui-view=""></div>',
  80. // resolve: ['luticateAuthUsers', function(luticateAuthUsers)
  81. // {
  82. // return luticateAuthUsers.loadUserData(null);
  83. // }]
  84. });
  85. $stateProvider.state('home', {
  86. url:'/',
  87. parent: 'root',
  88. title: "Home",
  89. reloadOnSearch: false,
  90. templateUrl:'views/home.html',
  91. controller:'HomeController'
  92. });
  93. $stateProvider.state('pkguid', {
  94. url:'/pkguid',
  95. parent: 'root',
  96. title: "PkGuid",
  97. reloadOnSearch: false,
  98. templateUrl:'views/pkguid.html',
  99. controller:'PkGuidController'
  100. });
  101. $urlRouterProvider.otherwise('/');
  102. }])
  103. .directive('dateNow', ['$filter', function($filter) {
  104. return {
  105. link: function( $scope, $element, $attrs) {
  106. $element.text($filter('date')(new Date(), $attrs.dateNow));
  107. }
  108. };
  109. }])
  110. .run(['$rootScope', '$state',
  111. function ($rootScope, $state) {
  112. $rootScope.$on('$stateChangeSuccess', function (event, current, previous) {
  113. $rootScope.title = current.title + " - App";
  114. });
  115. }]);