Modified to get the markup for component from page x-template script tag.