Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70432

Ion toolbar background from backend

$
0
0

@Astrid5 wrote:

hey guys. I’m aware that a good method to set a ion-toolbar background is:

--background: url('assets/images/whatever.png')  center 100%;

When this background is different for each item I have on my database, how can I set this variable? I’m trying the following:

const element: any = document.getElementById('header');
element.style.background = this.event.get('backgroundImage').url();

It doesn’t work at all. Any tips? thanks!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70432

Trending Articles



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