testViewDirective.js - some more refactoring to break down big link
function.