Use viewformat factory function in ViewCtrl.js