Skip to content

Commit

Permalink
cached components
Browse files Browse the repository at this point in the history
  • Loading branch information
Quickcorp committed May 28, 2018
1 parent 09ca110 commit 075e1a8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions QCObjects.js
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,7 @@
for (var attribute in attributenames){
data[attributenames[attribute]] = components[_c].getAttribute('data-'+attributenames[attribute]);
}
var cached = (components[_c].getAttribute('cached')=='true')?(true):(false);
if (CONFIG.get('preserveComponentBodyTag')){
Class('ComponentBody',Component,{
name:components[_c].getAttribute('name').toString(),
Expand All @@ -900,6 +901,7 @@
var newComponent = New(ComponentBody,{
name:components[_c].getAttribute('name').toString(),
data:data,
cached:cached,
templateURI:'{{COMPONENTS_BASE_PATH}}{{COMPONENT_NAME}}.html'.replace('{{COMPONENT_NAME}}',components[_c].getAttribute('name').toString()).replace('{{COMPONENTS_BASE_PATH}}',CONFIG.get('componentsBasePath')),
subcomponents:[]
});
Expand All @@ -912,6 +914,7 @@
var newComponent = New(Component,{
name:components[_c].getAttribute('name').toString(),
data:data,
cached:cached,
body:components[_c],
templateURI:'{{COMPONENTS_BASE_PATH}}{{COMPONENT_NAME}}.html'.replace('{{COMPONENT_NAME}}',components[_c].getAttribute('name').toString()).replace('{{COMPONENTS_BASE_PATH}}',CONFIG.get('componentsBasePath')),
subcomponents:[]
Expand Down

0 comments on commit 075e1a8

Please sign in to comment.