Refactored child and parent view templates in their directives