implemented directive to view content in viewer