Skip to content

Commit

Permalink
Step 23.18: Set the proper class on body
Browse files Browse the repository at this point in the history
  • Loading branch information
dotansimha committed Nov 27, 2016
1 parent 678d2aa commit a282eed
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions client/main.ts
Expand Up @@ -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();
Expand Down

0 comments on commit a282eed

Please sign in to comment.