Initial commit.
This commit is contained in:
commit
0335f5aa93
1168 changed files with 261999 additions and 0 deletions
app/scripts
47
app/scripts/app.js
Normal file
47
app/scripts/app.js
Normal file
|
@ -0,0 +1,47 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('ffffng', [
|
||||
'ngSanitize',
|
||||
'ngRoute',
|
||||
'ng',
|
||||
'leaflet-directive'
|
||||
])
|
||||
.config(function ($routeProvider) {
|
||||
$routeProvider
|
||||
.when('/', {
|
||||
templateUrl: 'views/main.html',
|
||||
controller: 'MainCtrl',
|
||||
title: 'Willkommen'
|
||||
})
|
||||
.when('/new', {
|
||||
templateUrl: 'views/newNodeForm.html',
|
||||
controller: 'NewNodeCtrl',
|
||||
title: 'Neuen Knoten anmelden'
|
||||
})
|
||||
.when('/update', {
|
||||
templateUrl: 'views/updateNodeForm.html',
|
||||
controller: 'UpdateNodeCtrl',
|
||||
title: 'Knotendaten ändern'
|
||||
})
|
||||
.otherwise({
|
||||
redirectTo: '/'
|
||||
});
|
||||
})
|
||||
.service('Navigator', function ($location) {
|
||||
return {
|
||||
home: function () {
|
||||
$location.url('/');
|
||||
},
|
||||
newNode: function () {
|
||||
$location.url('/new');
|
||||
},
|
||||
updateNode: function () {
|
||||
$location.url('/update');
|
||||
}
|
||||
};
|
||||
})
|
||||
.run(['$location', '$rootScope', function ($location, $rootScope) {
|
||||
$rootScope.$on('$routeChangeSuccess', function (event, current) {
|
||||
$rootScope.title = current.$$route.title;
|
||||
});
|
||||
}]);
|
Loading…
Add table
Add a link
Reference in a new issue