1
0
mirror of https://github.com/flarum/core.git synced 2025-10-17 17:56:14 +02:00

Precompile inline templates

Removing the in-browser compiler will save up to 30 kB (after
minification + gzipping) and boost startup performance. Win!
This commit is contained in:
Toby Zerner
2015-03-28 17:37:41 +10:30
parent 5028f6e877
commit 502fd14b50
4 changed files with 8 additions and 10 deletions

View File

@@ -32,7 +32,8 @@ export default DropdownButton.extend(HasItemLists, {
if (this.get('user.groups').findBy('id', '1')) {
items.pushObjectWithTag(Ember.Component.extend({
tagName: 'li',
layout: precompileTemplate('<a href="'+config.baseURL+'admin" target="_blank">{{fa-icon "wrench"}} Administration</a>')
baseURL: config.baseURL,
layout: precompileTemplate('<a href="{{baseURL}}admin" target="_blank">{{fa-icon "wrench"}} Administration</a>')
}));
}