Fun with Angular Filters

In building this website, I find myself using Angular filters to create dynamic views and cool UI tricks that automate style changes. I want the colors and layout of this site to change with each viewing. The overall layout and presentation will remain constant, I just want some of the visual structures to change on their own.

So far I’ve got 3 functions to help me jazz things up around here. One randomly picks between preconfigured styles prefixed in groups, the next generates a random pastel color for the requested style, and the last performs a filter on a custom paragraph object.

3 Helpful Angular functions.

Pastels provide a visual anchor for this website, but the actual colors change with each viewing. The effect is subtle, but it does help keep things feeling new and clean on the UI. I like the idea of this dynamism built into the Views and look forward to exploring it more in the future.

Tagged: #code

Posted on Jul 20, 2017