You have to spot-weld those parts at some point. Doing it via classes doesn't really change anything.
The advantage of doing it declaratively is that there is no DOM transversal (which can be very brittle) and you also won't need any markup for testing.
5
u/nerfornothing1138 Mar 18 '14
Anyone else not a fan of implementing logic into attributes of HTML elements?