admin implementation

This commit is contained in:
Athou
2013-03-29 16:05:29 +01:00
parent fc8bd5c812
commit 09c91106f8
5 changed files with 94 additions and 14 deletions

View File

@@ -1,28 +1,30 @@
var app = angular.module('commafeed', [ 'ui', 'ui.bootstrap', 'ui.state',
'commafeed.directives', 'commafeed.controllers', 'commafeed.services',
'commafeed.directives', 'commafeed.controllers', 'commafeed.services',
'ngSanitize', 'ngUpload', 'infinite-scroll' ]);
app.config(function($urlRouterProvider, $stateProvider) {
app.config(function($routeProvider, $stateProvider, $urlRouterProvider) {
$stateProvider.state('feeds', {
abstract: true,
url: '/feeds',
templateUrl: 'templates/feeds.html'
abstract : true,
url : '/feeds',
templateUrl : 'templates/feeds.html'
});
$stateProvider.state('feeds.view', {
url: '/view/:_type/:_id',
url : '/view/:_type/:_id',
templateUrl : 'templates/feeds.view.html'
});
$stateProvider.state('admin', {
abstract: true,
url: '/admin',
templateUrl: 'templates/admin.html'
abstract : true,
url : '/admin',
templateUrl : 'templates/admin.html'
});
$stateProvider.state('admin.users', {
url: '/users',
url : '/users',
templateUrl : 'templates/admin.users.html'
});
$urlRouterProvider.when('/', '/feeds/view/category/all');
$urlRouterProvider.when('/admin', '/admin/users');
$urlRouterProvider.otherwise('/');
});