Added directives to show and hide loading bars and viewport when routes are changed