Ready to start development
diff --git a/mCordPortal/src/cord.js b/mCordPortal/src/cord.js
index 62b388c..758f0e0 100644
--- a/mCordPortal/src/cord.js
+++ b/mCordPortal/src/cord.js
@@ -18,57 +18,36 @@
'use strict';
var modules = [
- 'ui.router',
- 'ngResource',
- 'ngAnimate',
- 'ngCookies',
- 'cordRest',
- 'cordMast',
- 'cordFoot',
- 'cordLogin',
- 'cordHome',
- 'cordUser',
- 'cordBundle'
- ];
+ 'ui.router',
+ 'ngResource',
+ 'ngAnimate',
+ 'ngCookies',
+ 'ngMap'
+ ];
- angular.module('cordGui', modules)
- .config(function ($stateProvider, $httpProvider) {
+ angular.module('mCord', modules)
+ .config(function ($stateProvider, $urlRouterProvider, $httpProvider) {
$httpProvider.interceptors.push('SetCSRFToken');
+ $urlRouterProvider.otherwise('/');
+
$stateProvider
.state('home', {
url: '/',
- controller: 'CordHomeCtrl',
- controllerAs: 'ctrl',
- templateUrl: 'app/view/home/home.html'
+ template: '<e-node-map></e-node-map>'
})
.state('login', {
url: '/login',
- controller: 'CordLoginCtrl',
- controllerAs: 'ctrl',
- templateUrl: 'app/view/login/login.html'
+ template: '<cord-login></cord-login>'
})
- .state('user', {
- url: '/user',
- controller: 'CordUserCtrl',
- controllerAs: 'ctrl',
- templateUrl: 'app/view/user/user.html'
- })
- .state('bundle', {
- url: '/bundle',
+ .state('services', {
+ url: '/services',
controller: 'CordBundleCtrl',
controllerAs: 'ctrl',
- templateUrl: 'app/view/bundle/bundle.html'
+ templateUrl: 'app/view/services/services.html'
});
})
- .controller('CordCtrl', function ($scope, $location, cordConfig) {
- $scope.shared = {
- url: 'http://' + $location.host() + ':' + $location.port()
- };
- $scope.shared.userActivity = cordConfig.userActivity;
- $scope.page = {};
- })
.constant('cordConfig', {
url: '',
userActivity: {}, //check if really needed
@@ -122,14 +101,20 @@
}
]
})
- .run(function($rootScope, $location, cordConfig, User){
+ .run(function($rootScope, $location, cordConfig, User, NgMap){
cordConfig.url = 'http://' + $location.host() + ':' + $location.port();
// basic authentication
- $rootScope.$on('$stateChangeStart', function(next, current) {
+ $rootScope.$on('$stateChangeStart', function() {
if(!User.isLoggedIn()){
$location.path('/login');
}
});
+
+ NgMap.getMap().then(function(map) {
+ console.log(map.getCenter());
+ console.log('markers', map.markers);
+ console.log('shapes', map.shapes);
+ });
});
}());