Skip to content

Commit

Permalink
allow components to have a separate style file
Browse files Browse the repository at this point in the history
specify the style file with component.prototype.style
  • Loading branch information
michael-brade authored and Rohan Manaphati committed May 12, 2015
1 parent 6b922a1 commit aca48e8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/components.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@ App.prototype.component = function(viewName, constructor) {
}
}

if (constructor.prototype.style) {
var styleFilename = constructor.prototype.style;
this.loadStyles(styleFilename);
}

// Associate the appropriate view with the component type
var view = this.views.find(viewName);
if (!view) {
Expand Down

0 comments on commit aca48e8

Please sign in to comment.