using a JS dict and angular expressions instead of jQuery DOM manipulation