mirror of
https://github.com/kemko/nomad.git
synced 2026-01-08 11:25:41 +03:00
Expose the token service in all templates for convenience
This commit is contained in:
12
ui/app/initializers/app-token.js
Normal file
12
ui/app/initializers/app-token.js
Normal file
@@ -0,0 +1,12 @@
|
||||
export function initialize() {
|
||||
const application = arguments[1] || arguments[0];
|
||||
|
||||
// Provides the acl token service to all templates
|
||||
application.inject('controller', 'token', 'service:token');
|
||||
application.inject('component', 'token', 'service:token');
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'app-token',
|
||||
initialize,
|
||||
};
|
||||
Reference in New Issue
Block a user