Showing posts with label ngStyle. Show all posts
Showing posts with label ngStyle. Show all posts

Sunday, 12 October 2014

Programatically Set Inline Styles for an Element

A few months ago I wrote a directive that had a requirement to be somewhat responsive. In order to achieve this I needed to change the width of an inner element. I also wanted to style up different parts of the component dependant upon certain conditions. As a result I had to use ng-style.