Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 229615

Add a glass to ion-page

$
0
0

I am detecting a platform in my app.component.ts file, where I want to add a several different scss to the ion-header, ion-content, ion-title etc. tags in my whole app. I want to add a global prefix (depending on my platform detected) to the whole app page, so:

<my-page class="ion-page show-page">

this one is generated by default for each ionic page. I want to be able to add additional class, so I can hierarchly modify all other required classes which are child to this one, so:

<my-page class="ion-page show-page **platform-ios**">

What is the best way to do this. I know I can use:
let elem = <HTMLElement> document.querySelector('my-page');
and basically add a class direct to the ‘my-page’ tag, but I don’t think this is a neat or good coding way, neither a great performer if you have lot of pages in the app.


Viewing all articles
Browse latest Browse all 229615

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>