How to template inline attributes in svelte? -


in repl example, how set style attribute inline, without needing duplicate anchor tag?

https://svelte.technology/repl?version=1.13.6&gist=0a2bd4376b2fe742fb0d233755c44796

to add zac's answer, add helper function returned style so:

export default {   helpers: {     getstyle ( page ) {       if ( page === 'about' ) return 'color: blue';       return '';     }   } }; 

Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -