Fix a bug introduced in #2710 where values could no longer be injected in views.

Signed-off-by: Ben Corlett <bencorlett@me.com>
Fix typo.

Signed-off-by: Ben Corlett <bencorlett@me.com>
Use ternary short-cut.
Refactoring view stuff.