-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Now we are in npm/webpack world we don't need these to give us scope.
- Loading branch information
1 parent
1bb2908
commit ea51189
Showing
142 changed files
with
10,149 additions
and
10,435 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,87 +1,85 @@ | ||
(function () { | ||
angular | ||
.module('admin') | ||
.config(AdminRoutes); | ||
angular | ||
.module('admin') | ||
.config(AdminRoutes); | ||
|
||
/* @ngInject */ | ||
function AdminRoutes($stateProvider) { | ||
/* @ngInject */ | ||
function AdminRoutes($stateProvider) { | ||
|
||
$stateProvider. | ||
state('admin', { | ||
url: '/admin', | ||
template: '<admin></admin>', // This should be lowercase | ||
requiresRole: 'admin', | ||
requiresAuth: true, | ||
footerHidden: true, | ||
data: { | ||
pageTitle: 'Admin', | ||
}, | ||
}). | ||
state('admin-audit-log', { | ||
url: '/admin/audit-log', | ||
// `template` is Angular state so | ||
// it should be lowercase, with dashes | ||
// This is the bridge towards (and from) React | ||
template: '<admin-audit-log></admin-audit-log>', | ||
requiresRole: 'admin', | ||
requiresAuth: true, | ||
footerHidden: true, | ||
data: { | ||
pageTitle: 'Admin - Audit log', | ||
}, | ||
}). | ||
state('admin-acquisition-stories', { | ||
url: '/admin/acquisition-stories', | ||
// `template` is Angular state so | ||
// it should be lowercase, with dashes | ||
// This is the bridge towards (and from) React | ||
template: '<admin-acquisition-stories></admin-acquisition-stories>', | ||
requiresRole: 'admin', | ||
requiresAuth: true, | ||
footerHidden: true, | ||
data: { | ||
pageTitle: 'Admin - Acquisition stories', | ||
}, | ||
}). | ||
state('admin-messages', { | ||
url: '/admin/messages', | ||
// `template` is Angular state so | ||
// it should be lowercase, with dashes | ||
// This is the bridge towards (and from) React | ||
template: '<admin-messages></admin-messages>', | ||
requiresRole: 'admin', | ||
requiresAuth: true, | ||
footerHidden: true, | ||
data: { | ||
pageTitle: 'Admin - Messages', | ||
}, | ||
}). | ||
state('admin-search-users', { | ||
url: '/admin/search-users', | ||
// `template` is Angular state so | ||
// it should be lowercase, with dashes | ||
// This is the bridge towards (and from) React | ||
template: '<admin-search-users></admin-search-users>', | ||
requiresRole: 'admin', | ||
requiresAuth: true, | ||
footerHidden: true, | ||
data: { | ||
pageTitle: 'Admin - Search users', | ||
}, | ||
}). | ||
state('admin-user', { | ||
url: '/admin/user', | ||
// `template` is Angular state so | ||
// it should be lowercase, with dashes | ||
// This is the bridge towards (and from) React | ||
template: '<admin-user></admin-user>', | ||
requiresRole: 'admin', | ||
requiresAuth: true, | ||
footerHidden: true, | ||
data: { | ||
pageTitle: 'Admin - User', | ||
}, | ||
}); | ||
$stateProvider. | ||
state('admin', { | ||
url: '/admin', | ||
template: '<admin></admin>', // This should be lowercase | ||
requiresRole: 'admin', | ||
requiresAuth: true, | ||
footerHidden: true, | ||
data: { | ||
pageTitle: 'Admin', | ||
}, | ||
}). | ||
state('admin-audit-log', { | ||
url: '/admin/audit-log', | ||
// `template` is Angular state so | ||
// it should be lowercase, with dashes | ||
// This is the bridge towards (and from) React | ||
template: '<admin-audit-log></admin-audit-log>', | ||
requiresRole: 'admin', | ||
requiresAuth: true, | ||
footerHidden: true, | ||
data: { | ||
pageTitle: 'Admin - Audit log', | ||
}, | ||
}). | ||
state('admin-acquisition-stories', { | ||
url: '/admin/acquisition-stories', | ||
// `template` is Angular state so | ||
// it should be lowercase, with dashes | ||
// This is the bridge towards (and from) React | ||
template: '<admin-acquisition-stories></admin-acquisition-stories>', | ||
requiresRole: 'admin', | ||
requiresAuth: true, | ||
footerHidden: true, | ||
data: { | ||
pageTitle: 'Admin - Acquisition stories', | ||
}, | ||
}). | ||
state('admin-messages', { | ||
url: '/admin/messages', | ||
// `template` is Angular state so | ||
// it should be lowercase, with dashes | ||
// This is the bridge towards (and from) React | ||
template: '<admin-messages></admin-messages>', | ||
requiresRole: 'admin', | ||
requiresAuth: true, | ||
footerHidden: true, | ||
data: { | ||
pageTitle: 'Admin - Messages', | ||
}, | ||
}). | ||
state('admin-search-users', { | ||
url: '/admin/search-users', | ||
// `template` is Angular state so | ||
// it should be lowercase, with dashes | ||
// This is the bridge towards (and from) React | ||
template: '<admin-search-users></admin-search-users>', | ||
requiresRole: 'admin', | ||
requiresAuth: true, | ||
footerHidden: true, | ||
data: { | ||
pageTitle: 'Admin - Search users', | ||
}, | ||
}). | ||
state('admin-user', { | ||
url: '/admin/user', | ||
// `template` is Angular state so | ||
// it should be lowercase, with dashes | ||
// This is the bridge towards (and from) React | ||
template: '<admin-user></admin-user>', | ||
requiresRole: 'admin', | ||
requiresAuth: true, | ||
footerHidden: true, | ||
data: { | ||
pageTitle: 'Admin - User', | ||
}, | ||
}); | ||
|
||
} | ||
}()); | ||
} |
100 changes: 49 additions & 51 deletions
100
modules/contacts/client/config/contacts.client.routes.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,57 @@ | ||
import contactAddTemplateUrl from '@/modules/contacts/client/views/add-contact.client.view.html'; | ||
import contactConfirmTemplateUrl from '@/modules/contacts/client/views/confirm-contact.client.view.html'; | ||
|
||
(function () { | ||
angular | ||
.module('contacts') | ||
.config(ContactsRoutes); | ||
|
||
/* @ngInject */ | ||
function ContactsRoutes($stateProvider) { | ||
|
||
$stateProvider. | ||
state('contactAdd', { | ||
url: '/contact-add/:userId', | ||
templateUrl: contactAddTemplateUrl, | ||
requiresAuth: true, | ||
controller: 'ContactAddController', | ||
controllerAs: 'contactAdd', | ||
resolve: { | ||
// A string value resolves to a service | ||
ContactByService: 'ContactByService', | ||
UsersMini: 'UsersMini', | ||
|
||
existingContact: function (ContactByService, $stateParams) { | ||
return ContactByService.get({ userId: $stateParams.userId }); | ||
}, | ||
|
||
friend: function (UsersMini, $stateParams) { | ||
return UsersMini.get({ | ||
userId: $stateParams.userId, | ||
}); | ||
}, | ||
angular | ||
.module('contacts') | ||
.config(ContactsRoutes); | ||
|
||
/* @ngInject */ | ||
function ContactsRoutes($stateProvider) { | ||
|
||
$stateProvider. | ||
state('contactAdd', { | ||
url: '/contact-add/:userId', | ||
templateUrl: contactAddTemplateUrl, | ||
requiresAuth: true, | ||
controller: 'ContactAddController', | ||
controllerAs: 'contactAdd', | ||
resolve: { | ||
// A string value resolves to a service | ||
ContactByService: 'ContactByService', | ||
UsersMini: 'UsersMini', | ||
|
||
existingContact: function (ContactByService, $stateParams) { | ||
return ContactByService.get({ userId: $stateParams.userId }); | ||
}, | ||
data: { | ||
pageTitle: 'Add contact', | ||
}, | ||
}). | ||
state('contactConfirm', { | ||
url: '/contact-confirm/:contactId', | ||
templateUrl: contactConfirmTemplateUrl, | ||
requiresAuth: true, | ||
controller: 'ContactConfirmController', | ||
controllerAs: 'contactConfirm', | ||
resolve: { | ||
// A string value resolves to a service | ||
Contact: 'Contact', | ||
|
||
contact: function (Contact, $stateParams) { | ||
return Contact.get({ contactId: $stateParams.contactId }); | ||
}, | ||
|
||
friend: function (UsersMini, $stateParams) { | ||
return UsersMini.get({ | ||
userId: $stateParams.userId, | ||
}); | ||
}, | ||
data: { | ||
pageTitle: 'Confirm contact', | ||
}, | ||
data: { | ||
pageTitle: 'Add contact', | ||
}, | ||
}). | ||
state('contactConfirm', { | ||
url: '/contact-confirm/:contactId', | ||
templateUrl: contactConfirmTemplateUrl, | ||
requiresAuth: true, | ||
controller: 'ContactConfirmController', | ||
controllerAs: 'contactConfirm', | ||
resolve: { | ||
// A string value resolves to a service | ||
Contact: 'Contact', | ||
|
||
contact: function (Contact, $stateParams) { | ||
return Contact.get({ contactId: $stateParams.contactId }); | ||
}, | ||
}); | ||
|
||
} | ||
}()); | ||
}, | ||
data: { | ||
pageTitle: 'Confirm contact', | ||
}, | ||
}); | ||
|
||
} |
Oops, something went wrong.