Skip to content

Commit

Permalink
passing component to viewClass and controllerClass
Browse files Browse the repository at this point in the history
  • Loading branch information
Quickcorp committed Jul 7, 2018
1 parent 613b0e9 commit 929b456
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions QCObjects.js
Original file line number Diff line number Diff line change
Expand Up @@ -896,12 +896,12 @@
var viewName = this.body.getAttribute('viewClass');
if (viewName != null && _QC_CLASSES.hasOwnProperty(viewName)){
var View = _QC_CLASSES[viewName];
this.view = New(View); // Initializes the main view for the component
this.view = New(View,{component:this}); // Initializes the main view for the component
}
var controllerName = this.body.getAttribute('controllerClass');
if (controllerName != null && _QC_CLASSES.hasOwnProperty(controllerName)){
var Controller = _QC_CLASSES[controllerName];
this.controller = New(Controller); // Initializes the main controller for the component
this.controller = New(Controller,{component:this}); // Initializes the main controller for the component
}
this.subcomponents = _buildComponent(this.body.querySelectorAll(tagFilter));
this.body.setAttribute('loaded',true);
Expand Down

0 comments on commit 929b456

Please sign in to comment.