From 6eb1ef5fb540fa36cfb4a1d55f8e7249fb9d28d8 Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Thu, 3 Dec 2015 15:31:48 -0600 Subject: [PATCH] dynamically add link element for testing --- ionic/config/bootstrap.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ionic/config/bootstrap.ts b/ionic/config/bootstrap.ts index e575f2ddc9..3a7a98619d 100644 --- a/ionic/config/bootstrap.ts +++ b/ionic/config/bootstrap.ts @@ -98,7 +98,13 @@ function setupDom(window, document, config, platform, clickBlock, featureDetect) // set the mode class name // ios/md - bodyEle.classList.add(config.get('mode')); + let mode = config.get('mode'); + bodyEle.classList.add(mode); + + let linkEle = document.createElement('link'); + linkEle.setAttribute('href', '../../../css/ionic.' + mode + '.css'); + linkEle.setAttribute('ref', 'stylesheet'); + document.head.appendChild(linkEle); // touch devices should not use :hover CSS pseudo // enable :hover CSS when the "hoverCSS" setting is not false