3
I have a div with an after and would like to change the background color of that after dynamically via controller, however I am not succeeding in importing ng-class in parent div.
<div class="infos" ng-class="myController.infoBlue">
My Infos.
:after
</div>
Note: I have different styles in div and :after. Div has a background of one color and my after has a background of another color and I want to change only the after.
Hello didn’t work for me. I have different styles between div and :after. div has a background of one color and my after has another. and I just want to change the after.
– peterq
@peterq I changed the code again. I used only DIVS and the same way Voce spoke. The Parent div is yellow and the other Divs with the :after have independent colours. http://plnkr.co/edit/zmokTDQnJsArl49ynczK?p=preview
– Denison Luz
Hello is not the Parent is in the same div. bag? . div { background-color: blue &:after{background-color: Yellow}}
– peterq