Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • Your solution seems to be the perfect one. But, there is some issue with the code you mentioned. @HostBinding('style') styles() is not working and I tried binding to @HostBinding('attr.style') then it was said to be unsafe. I had to do a single style binding like @HostBinding('style.flex-direction'). Can you please update that and I will mark your answer as correct. Thanks for the answer. Commented Feb 3, 2019 at 16:53
  • 1
    Oh right, you have to use the DomSanitizer as shown in this answer. I will amend my answer. Commented Feb 3, 2019 at 17:07
  • Awesome! Thanks again for the help. Commented Feb 3, 2019 at 17:20