mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 11:22:19 +03:00
8ae5e65462
fixes #3724 - provide config.url to the ember client app via a data attribute - create server and client side helpers to output the URL - wire up the client side helper - add a class for testing, and add tests for both the server and client side
20 lines
640 B
JavaScript
20 lines
640 B
JavaScript
var ConfigInitializer = {
|
|
name: 'config',
|
|
|
|
initialize: function (container, application) {
|
|
var apps = $('body').data('apps'),
|
|
fileStorage = $('body').data('filestorage'),
|
|
blogUrl = $('body').data('blogurl');
|
|
|
|
application.register(
|
|
'ghost:config', {apps: apps, fileStorage: fileStorage, blogUrl: blogUrl}, {instantiate: false}
|
|
);
|
|
|
|
application.inject('route', 'config', 'ghost:config');
|
|
application.inject('controller', 'config', 'ghost:config');
|
|
application.inject('component', 'config', 'ghost:config');
|
|
}
|
|
};
|
|
|
|
export default ConfigInitializer;
|