how can i make my code appear on runtime when deployed ? should i parse it and how do i parse it ? and on the console.log it shows me the array of colors getRandomColor(){ console.log('colorsss') // let colors = ['#33FFFD', '#FFD133','#FF7733','#3386FF']; console.log(this.badgesColorSet) const badgesColorSet = JSON.parse(localStorage.getItem('badgesColorSet')); return this.badgesColorSet[Math.floor(Math.random() * this.badgesColorSet.length)]; } "badgesColorSet": "['#33FFFD', '#FFD133','#FF7733','#3386FF']" //i have added this code in turnkey-config.json <pre>export class MainService { primaryColor; url ; myRoutes: any[] = []; count: number; triggererModule = new Subject<any>(); triggererProgram = new Subject<any>(); badgesColorSet: []; constructor(private globalParamsService: GlobalParametersService, private http: HttpClient, private store: Store<AppState>, private router: Router , private appInitService: AppInitService) { this.url = this.appInitService.config.urlPath this.primaryColor = this.appInitService.config.primaryColor this.badgesColorSet = this.appInitService.config.badgesColorSet }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)