diff --git a/lib/components.js b/lib/components.js index ad5c1112a..96e6f2110 100644 --- a/lib/components.js +++ b/lib/components.js @@ -194,6 +194,12 @@ App.prototype.component = function(viewName, constructor) { } } + // Load style from component prototype property if existing + 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) {