import {Component, OnInit} from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.scss'] }) export class AppComponent implements OnInit{ items: any[]; ngOnInit(): void { let styleSheets = document.styleSheets; for(let i in styleSheets){ let cssRules = styleSheets[i]['cssRules'] for(let key in cssRules){ let isObj = typeof cssRules[key] == 'object' if(isObj){ if(cssRules[key]['selectorText']){ let text = cssRules[key]['selectorText'] let pre = text.substr(0,5); if(pre == '.ion-'){ text = text.replace(/\.ion-/,''); text = text.replace(/\:\:before/,''); this.items.push(text) } } } } } } constructor(){ this.items = []; } }