6bd5387fee4347f308220cda562fab5b558d7feb
[ccsdk/apps.git] / sdnr / wireless-transport / code-Carbon-SR1 / ux / odlChat / odlChat-module / src / main / resources / odlChat / odlChat.module.js
1 /*
2  * Copyright (c) 2016 highstreet technologies GmbH and others. All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 define(['angularAMD', 'app/routingConfig', 'app/core/core.services', 'common/config/env.module'], function(ng) {
10   var odlChatApp = angular.module('app.odlChat', ['app.core', 'ui.router.state','config']);
11
12   odlChatApp.config(function($stateProvider, $compileProvider, $controllerProvider, $provide, NavHelperProvider, $translateProvider) {
13     odlChatApp.register = {
14       controller : $controllerProvider.register,
15       directive : $compileProvider.directive,
16       factory : $provide.factory,
17       service : $provide.service
18
19     };
20
21
22     NavHelperProvider.addControllerUrl('app/odlChat/odlChat.controller');
23     NavHelperProvider.addToMenu('odlChat', {
24       "link" : "#/odlChat",
25       "active" : "main.odlChat",
26       "title" : "Chat",
27       "icon" : "fa-comments", // Add navigation icon css class here
28       "page" : {
29         "title" : "Chat",
30         "description" : "odlChat"
31       }
32     });
33
34     var access = routingConfig.accessLevels;
35
36     $stateProvider.state('main.odlChat', {
37         url: 'odlChat',
38         access: access.admin,
39         views : {
40             'content' : {
41                 templateUrl: 'src/app/odlChat/odlChat.tpl.html',
42                 controller: 'odlChatCtrl'
43             }
44         }
45     });
46
47   });
48
49   return odlChatApp;
50 });