My suggestion uses internals provided by angular, and feels more understandable if I look at this am trying to understand from the template what it's doing.