all files / app/main/components/material-docs/ material-docs.module.js

16.67% Statements 3/18
100% Branches 0/0
25% Functions 1/4
16.67% Lines 3/18
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110                                                                                                                                                                                                                      
(function ()
{
    'use strict';
 
    /**
     * Replace those for demo assets
     * img/                     >>>            assets/angular-material-assets/img/
     * 'icons                   >>>            'assets/angular-material-assets/icons/
     */
    angular
        .module('app.components.material-docs', ['ngMaterial', 'ngMessages'])
        .config(config);
 
    /** @ngInject */
    function config(msNavigationServiceProvider, $stateProvider, ELEMENTS_NAVIGATION, LAYOUT_NAVIGATION)
    {
        msNavigationServiceProvider.saveItem('components.elements', {
            title : 'Angular Material Elements',
            icon  : 'icon-layers',
            weight: 0
        });
 
        msNavigationServiceProvider.saveItem('components.elements.inputs', {
            title : 'Inputs',
            weight: 0
        });
 
        msNavigationServiceProvider.saveItem('components.elements.buttons', {
            title : 'Buttons',
            weight: 1
        });
 
        msNavigationServiceProvider.saveItem('components.elements.content-elements', {
            title : 'Content Elements',
            weight: 2
        });
 
        msNavigationServiceProvider.saveItem('components.elements.lists', {
            title : 'Lists',
            weight: 3
        });
 
        msNavigationServiceProvider.saveItem('components.elements.menus', {
            title : 'Menus',
            weight: 4
        });
 
        msNavigationServiceProvider.saveItem('components.elements.progress', {
            title : 'Progress',
            weight: 5
        });
 
        msNavigationServiceProvider.saveItem('components.elements.others', {
            title : 'Others',
            weight: 6
        });
 
        msNavigationServiceProvider.saveItem('components.material_layout', {
            title : 'Angular Material Layout',
            icon  : 'icon-view-quilt',
            weight: 1
        });
 
 
        angular.forEach(ELEMENTS_NAVIGATION, function (component)
        {
 
            $stateProvider.state('app.docs_' + component.stateName, {
                url  : '/components/angular-material-elements/' + component.url,
                views: {
                    'content@app': {
                        templateUrl: 'app/main/components/material-docs/material-doc-template.html',
                        controller : 'DocTemplateController as vm'
                    }
                },
                data : component
            });
 
            // Navigation
            msNavigationServiceProvider.saveItem(component.navPath + '.' + component.url, {
                title : component.name,
                state : 'app.docs_' + component.stateName,
                weight: component.weight
            });
        });
 
        angular.forEach(LAYOUT_NAVIGATION, function (component)
        {
 
            $stateProvider.state('app.docs_' + component.stateName, {
                url  : '/components/angular-material-elements/' + component.url,
                views: {
                    'content@app': {
                        templateUrl: 'app/main/components/material-docs/layout/layout-template.html',
                        controller : 'LayoutTemplateController as vm',
                    },
                },
                data : component
            });
 
            // Navigation
            msNavigationServiceProvider.saveItem('components.material_layout.' + component.url, {
                title : component.name,
                state : 'app.docs_' + component.stateName,
                weight: component.weight
            });
        });
 
    }
})();