Permalink
Browse files

Step 23.18: Set the proper class on body

  • Loading branch information...
1 parent 2db6d2a commit 8e4802342e1f669f1d50aabc3af1415728e485a1 @dotansimha dotansimha committed with DAB0mB Sep 28, 2016
Showing with 11 additions and 0 deletions.
  1. +11 −0 client/main.ts
View
@@ -8,9 +8,20 @@ import '../both/methods/parties.methods';
import ionicSelector from 'ionic-selector';
+function setClass(css) {
+ if (!document.body.className) {
+ document.body.className = "";
+ }
+ document.body.className += " " + css;
+}
+
Meteor.startup(() => {
if (Meteor.isCordova) {
ionicSelector("app");
+ setClass('mobile');
+ }
+ else {
+ setClass('web');
}
const platform = platformBrowserDynamic();

0 comments on commit 8e48023

Please sign in to comment.