Skip to content Skip to sidebar Skip to footer

How To Set The Css Of The Li:before With Ng-style

I want to change the width value of the li:before with a variable scope (width).
  • Solution 1:

    Unfortunately you cannot have pseudoelements within inline styling. What you could do is have two sepparate CSS Classes like

    .a:before {}
    .b:before {}
    

    This way you could use ngClass to add the appropriate class to your HTML

Post a Comment for "How To Set The Css Of The Li:before With Ng-style"