October 5, 2018
Angular 2 – Set Class of parent element with @HostBindings
With the @HostBinding()
annotation, Angular gives you a useful tool to handle manipulations of css classes of parent Elements. The advantage is quite clear, the required logic remains in the components class and is not set in the template file. This makes it easier to test and improves the readability of the template file. In […]
READ MORE