ngStyle object expression multiple values for property angular 2 -


is possible add multiple values property in ngstyle directive? example:

<div [ngstyle]='{"background" : ["rgba(248,80,50,1)", "-webkit-gradient(left top, right top, color-stop(0%, rgba(248,80,50,1)), color-stop(50%, rgba(241,111,92,1)), color-stop(51%, rgba(246,41,12,1)), color-stop(71%, rgba(240,47,23,1)), color-stop(100%, rgba(231,56,39,1)))"]}' ></div> 

thanks

in example couldn't use custom class? in component definition can include unique stylesheet particular component styleurls. example:

@component({ selector: 'my-component', moduleid: module.id, templateurl: 'my-component.html', styleurls: ['my-component.css'] // <-- here }) 

another way might easier use ngclass if need toggle different styles well.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -