123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- 'use strict';
-
- /* App Module */
-
- angular.module('app', [
- 'ui.bootstrap',
- 'ui.router',
- 'LocalStorageModule',
- 'ngMaterial',
- 'md.data.table',
- 'sasrio.angular-material-sidenav',
- 'luticate2Utils',
- // 'luticateAuth',
- 'appSdk'
- ])
- .config(['$stateProvider', '$urlRouterProvider', 'ssSideNavSectionsProvider', '$mdThemingProvider', '$mdIconProvider',
- function($stateProvider, $urlRouterProvider, ssSideNavSectionsProvider, $mdThemingProvider, $mdIconProvider) {
-
- // $mdThemingProvider
- // .theme('default')
- // .primaryPalette('blue', {
- // 'default': '700'
- // });
-
- // $mdThemingProvider.theme('default')
- // .primaryPalette('blue')
- // .accentPalette('pink');
-
- $mdIconProvider
- .icon('md-toggle-arrow', 'img/arrow.svg');
-
- ssSideNavSectionsProvider.initWithTheme($mdThemingProvider);
- ssSideNavSectionsProvider.initWithSections([{
- id: 'toogle_1',
- name: 'Home',
- type: 'heading',
- children: [{
- name: 'Home 1',
- type: 'toggle',
- pages: [{
- id: 'toogle_1_link_1',
- name: 'Home 1 1',
- state: 'home'
- }, {
- id: 'toogle_1_link_2',
- name: 'Home 1 2',
- state: 'home.1.2',
- hidden: true
- }, {
- id: 'toogle_1_link_3',
- name: 'Home 1 3',
- state: 'home.1.3'
- }]
- }]
- }, {
- id: 'link_1',
- name: 'Home 2 ',
- state: 'home.2',
- type: 'link',
- icon: 'fa fa-check'
- }, {
- id: 'link_2',
- name: 'Home 3',
- state: 'home.3',
- type: 'link'
- }, {
- id: 'link_3',
- name: 'Link 3',
- state: 'common.link3',
- type: 'link',
- hidden: true
- }, {
- id: 'toogle_2',
- name: 'PkGuid',
- type: 'heading',
- children: [{
- name: 'PkGuids',
- type: 'toggle',
- pages: [{
- id: 'toogle_2_link_1',
- name: 'All',
- state: 'pkguid'
- },{
- id: 'toogle_2_link_1',
- name: 'New',
- state: 'pkguid_add'
- }]
- }]
- }]);
-
- $stateProvider.state('root', {
- abstract: true,
- template: '<div ui-view=""></div>',
- // resolve: ['luticateAuthUsers', function(luticateAuthUsers)
- // {
- // return luticateAuthUsers.loadUserData(null);
- // }]
- });
-
- $stateProvider.state('home', {
- url:'/',
- parent: 'root',
- title: "Home",
- reloadOnSearch: false,
- templateUrl:'views/home.html',
- controller:'HomeController'
- });
-
- $stateProvider.state('pkguid', {
- url:'/pkguids',
- parent: 'root',
- title: "PkGuid",
- reloadOnSearch: false,
- templateUrl:'views/pkguid.html',
- controller:'PkGuidController'
- });
-
- $stateProvider.state('pkguid_add', {
- url:'/pkguids/add',
- parent: 'root',
- title: "New PkGuid",
- reloadOnSearch: false,
- templateUrl:'views/pkguidedit.html',
- controller:'PkGuidEditController'
- });
-
- $stateProvider.state('pkguid_edit', {
- url:'/pkguids/edit/:id',
- parent: 'root',
- title: "Edit PkGuid",
- reloadOnSearch: false,
- templateUrl:'views/pkguidedit.html',
- controller:'PkGuidEditController',
- params: {
- pkguid: null
- }
- });
-
- $urlRouterProvider.otherwise('/');
- }])
- .directive('dateNow', ['$filter', function($filter) {
- return {
- link: function( $scope, $element, $attrs) {
- $element.text($filter('date')(new Date(), $attrs.dateNow));
- }
- };
- }])
- .run(['$rootScope', '$transitions', function ($rootScope, $transitions) {
- $transitions.onSuccess({}, function($transitions)
- {
- var toState = $transitions.$to();
- $rootScope.title = toState.title + " - App";
- });
- }]);
|