I want to mimic something that I have done with JQuery
using AngularJS
.
Below is the fiddle for it.
Three things I have done here.
- Find the last element of the right column.
- Pickup the attribute 'data-color' from it
- Assign the value of the attribute as a class to the 'right-col'
Try this JSFiddle: https://jsfiddle.net/ubqrah1w/
It uses an angular directive.