Release
This commit is contained in:
8
client/core/config/config.bt.js
Normal file
8
client/core/config/config.bt.js
Normal file
@@ -0,0 +1,8 @@
|
||||
module.exports = function (bt) {
|
||||
bt.match('config', function (ctx) {
|
||||
ctx.setTag('script');
|
||||
ctx.setAttr('id', 'config');
|
||||
ctx.setAttr('type', 'text/json');
|
||||
ctx.setContent(JSON.stringify(ctx.getParam('config')));
|
||||
});
|
||||
};
|
||||
4
client/core/config/config.js
Normal file
4
client/core/config/config.js
Normal file
@@ -0,0 +1,4 @@
|
||||
modules.define('config', function (provide) {
|
||||
var domNode = document.getElementById('config');
|
||||
provide(domNode ? JSON.parse(domNode.innerHTML) : {});
|
||||
});
|
||||
Reference in New Issue
Block a user