From c270ad5c62bef5cbbb71ed9491c2d6f71c40e618 Mon Sep 17 00:00:00 2001 From: cjblomqvist Date: Fri, 9 Jan 2015 19:44:25 +0100 Subject: [PATCH] Add component level stylesheet setting --- lib/components.js | 6 ++++++ 1 file changed, 6 insertions(+) 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) {