summaryrefslogtreecommitdiffstats
path: root/vnfmarket/app/app.config.js
blob: ea8c4c5e395c421a225e7bda397f42a759d4f0e2 (plain)
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
/*
 * Copyright 2017 Huawei Technologies Co., Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
(function() {
    'use strict';

    /**
     * @ngdoc configuration file
     * @name app.config:config
     * @description
     * # Config and run block
     * Configutation of the app
     */


    angular
        .module('vnfmarket')
        .config(configure)
        .run(runBlock);

    configure.$inject = ['$stateProvider', '$urlRouterProvider', '$locationProvider', '$httpProvider', '$mdThemingProvider', '$translateProvider'];
    //red, pink, purple, deep-purple, indigo, blue, light-blue, cyan, teal, green, light-green, lime, yellow, amber, orange, deep-orange, brown, grey, blue-grey
    function configure($stateProvider, $urlRouterProvider, $locationProvider, $httpProvider, $mdThemingProvider, $translateProvider) {
        // This is required for Browser Sync to work poperly
        //$httpProvider.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';

        // The above lines is commented for CORS
        // For CORS
        $httpProvider.defaults.useXDomain = true;
        delete $httpProvider.defaults.headers.common['X-Requested-With'];
        // END of CORS


        // Angualr material
        // $mdThemingProvider.theme('default')
        //     .primaryPalette('light-blue')
        //      .accentPalette('light-blue', {
        //       'hue-1': 'A100' // use shade 200 for default, and keep all other shades the same
        //     });

        $mdThemingProvider.definePalette('amazingPaletteName', {
            '50': 'ff8a80',
            '100': 'eaeaea',
            '200': 'ef9a9a',
            '300': '#37474f',
            '400': '#37474f',
            '500': 'f44336',
            '600': 'e53935',
            '700': 'd32f2f',
            '800': 'c62828',
            '900': 'b71c1c',
            'A100': 'ff8a80',
            'A200': '#78909c',
            'A400': '#90a4ae',
            'A700': '#428bca'
            });

            $mdThemingProvider.theme('default')
            .primaryPalette('amazingPaletteName',{
                'default' : 'A700',
                'hue-1' : "A700",
                'hue-2' : "100",
                'hue-3' : "A200"
            }).accentPalette('amazingPaletteName', {
            'hue-1' : 'A400'
            })

        $locationProvider.hashPrefix('!');

        // Default Routing
        $urlRouterProvider
            .otherwise('/marketplace');

        $translateProvider.useSanitizeValueStrategy(null);
        $translateProvider.useStaticFilesLoader({
            prefix: "vnfmarket/common/locale/locale-",
            suffix: ".json"
        });
        $translateProvider.preferredLanguage('en')
    }

    runBlock.$inject = ['$rootScope'];

    function runBlock($rootScope) {
        'use strict';

        console.log('AngularJS run() function...');
    }


})();